string class : StartsWith(string) method
Description
It returns a boolean value that represents whether caller string starts with argument.
Syntax
stringInstance.StartsWith(string startString)
Arguments
| Class | Name | Description |
| string | startString | A start string. |
Return value
| Class | Description |
| bool | A boolean value that represents whether caller string start with argument. |
Sample code
| 1: | string str = "sample string"; |
| 2: | bool startWith = str.StartsWith("sample"); // The result (startWith) 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.StartsWith(String).
If caller string starts with argument, it returns true. Otherwise, it returns false.


