NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

CompareInfo.IsPrefix (String, String)

Determines whether the specified prefix is the string's prefix.

[Visual Basic]
Overloads Overridable Public Function IsPrefix( _
   ByVal source As String, _
   ByVal prefix As String _
) As Boolean
[C#]
public virtual bool IsPrefix(
   string source,
   string prefix
);
[C++]
public: virtual bool IsPrefix(
   String* source,
   String* prefix
);
[JScript]
public function IsPrefix(
   source : String,
   prefix : String
) : Boolean;

Parameters

source
The string to search.
prefix
The prefix to search for within the string.

Return Value

true if prefix is the same as the string's prefix or if the prefix is an empty string; false if the length of prefix is greater than the length of string.[RB22]

Exceptions

Exception Type Condition
NullReferenceException is thrown if string or prefix are null.

See Also

CompareInfo Class | CompareInfo Members | System.Globalization Namespace | CompareInfo.IsPrefix Overload List