EndsWithString
The EndsWithStringfunction indicates whether a specified source string ends with a specified search string.
Syntax
Copy code | |
---|---|
bool EndsWithString( string sourceString, string searchString, bool ignoreCase ); |
Parameters
Return values
Returns true if the string specified by sourceStringends with the string specified by searchString. Returns false if either the sourceStringdoes not end with searchString, or if searchStringis longer than sourceString.
Example code
The following code example assumes that userAtHostUricontains a SIP URI. The example code in effect determines whether the SIP address belongs to the EDU top-level domain, and is case-insensitive.
Copy code | |
---|---|
EndsWithString(GetHostName(userAtHostUri), "edu", "true") |