StartsWithString
The StartsWithStringfunction indicates whether a specified source string begins with a specified search string.
Syntax
Copy code | |
---|---|
bool StartsWithString( string sourceString, string searchString, bool ignoreCase ); |
Parameters
Return values
Returns true if the string specified by sourceStringbegins with the string specified by searchString. Returns false if either the sourceStringdoes not begin with searchString, or if searchStringis longer than sourceString.
Example code
The following code example assumes that headerStringcontains a SIP URI that includes a parameter named "user". The example code determines whether the value of the user parameter begins with "phone", and is case-insensitive.
Copy code | |
---|---|
StartsWithString(GetParameterValue(headerString, "user"), "phone", "true") |