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;
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]
Exception Type | Condition |
---|---|
NullReferenceException | is thrown if string or prefix are null. |
CompareInfo Class | CompareInfo Members | System.Globalization Namespace | CompareInfo.IsPrefix Overload List