This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
The EndsWithString function indicates whether a specified source string ends with a specified search string.
Returns true if the string specified by sourceString ends with the string specified by searchString. Returns false if either the sourceString does not end with searchString, or if searchString is longer than sourceString.
The following code example assumes that userAtHostUri contains a SIP URI. The example code in effect determines whether the SIP address belongs to the EDU top-level domain, and is case-insensitive.
EndsWithString(GetHostName(userAtHostUri), "edu", "true")