EndsWithString(string,string,bool) function

Microsoft Office Live Communications Server 2005 with SP1

EndsWithString

The EndsWithString function indicates whether a specified source string ends with a specified search string.

boolEndsWithString(stringsourceString,
stringsearchString,
boolignoreCase);

Parameters

  • sourceString
    Specifies the source string that the function examines.
  • searchString
    Specifies the string to search for at the end of the string specified by sourceString.
  • ignoreCase
    Specifies whether the search is case-sensitive or case-insensitive. If false, the search is case-sensitive. If true, the search is case-insensitive.

Return Values

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.

Example Code

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")
What did you think of this topic?
© 2008 Microsoft Corporation. All rights reserved.