NAnt
Help
Function Reference
string::last-index-of |
v0.92 |
Returns the position of the last occurrence in the specified string of the given search string.
int string::last-index-of(source, value)
| Name | Type | Description |
|---|---|---|
| source | string | The string to search. |
| value | string | The string to locate within source. |
The highest-index position of value in source if it is found, or -1 if source does not contain value.
If value is an empty string, the return value is the last index position in source.
string::last-index-of('testing string', 'test') ==> 0string::last-index-of('testing string', '') ==> 13string::last-index-of('testing string', 'Test') ==> -1string::last-index-of('testing string', 'ing') ==> 11