Summary
Tests whether the specified string ends with the specified suffix
string.
Syntax
[Function("ends-with")]
public static bool EndsWith(string s1, string s2)
Examples
string::ends-with('testing string', 'string') ==> true
string::ends-with('testing string', '') ==> true
string::ends-with('testing string', 'bring') ==> false
string::ends-with('string', 'testing string') ==> false
This function performs a case-sensitive word search using the
invariant culture.
Attributes
Type |
Description |
FunctionAttribute |
Indicates that the method should be exposed as a function in NAnt build
files.
|
Parameters
Name |
Type |
Description |
s1 |
string |
test string |
s2 |
string |
suffix string |
Return Value
Type |
Description |
bool |
true when s2 is a suffix for
the string s1. Meaning, the characters at the
end of s1 are identical to
s2; otherwise, false .
|