CorString: StartsWith

StartsWith

Determines whether the beginning of a string matches the specified string when compared using the specified comparison option.



 Public Function StartsWith(
	  ByRef s As String,
	  ByRef Value As String,
	  Optional ByVal ComparisonType As StringComparison = StringComparison. Ordinal ) As Boolean

Parameters

s
[ByRef] String. The string to check.
Value
[ByRef] String. The string to compare to the substring at the beginning of s.
ComparisonType
[ByVal] Optional. StringComparison. One of the enumeration values that determines how s and Value are compared.  

Default: StringComparison . Ordinal

Return Values

Boolean -  True if the s parameter begins with Value; otherwise False.

Exceptions

Exception Condition
ArgumentExceptionComparisonType is not a StringComparison value.

See Also

Project CorLib Overview

Class CorString Overview