"endsWith" (string::endsWith)
Returns true if the string ends with s, otherwise false.
Synopsis
bool string.endsWith(string s, CaseSensitivity cs = CaseSensitive);
Parameters
| Parameter | Description |
|---|---|
| s | String to be searched. |
| cs |
Decides if the search is case sensitive. Can be either:
|
Description
Returns true if the string ends with s, otherwise false.
Example
main()
{
string fileName = "Report.TXT";
DebugN(fileName.endsWith(".txt", string::CaseSensitive));
DebugN(fileName.endsWith(".txt", string::CaseInsensitive));
}
Console output:
WCCOAui1:["0"]
WCCOAui1:["1"]
Assignment
String
