string class : Contains(string) method
Description
It returns a boolean value that represents whether argument contains in the caller string.
Syntax
stringInstance.Contains(string searchString)
Arguments
Class | Name | Description |
string | searchString | A search string. |
Return value
Class | Description |
bool | A boolean value that represents whether argument contains in the caller string. |
Sample code
1: | string str = "wwxxyyzz"; |
2: | bool containing = str.Contains("ww"); // The result (containing) is true. |
Notes
This method is a member introduced from the Rice ver 1.0.1.1.
It's a wrapper of the System.String.Contains(String).
If an argument contains in the caller string, it returns true. Otherwise, it returns false.
If an argument is empty string, it returns true.