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