Determines whether a specified string is a suffix of the current instance.
[Visual Basic] Public Function EndsWith( _ ByVal value As String _ ) As Boolean [C#] public bool EndsWith( string value ); [C++] public: bool EndsWith( String* value ); [JScript] public function EndsWith( value : String ) : Boolean;
true if either value matches the end of this string or value is an empty string (i.e., equals Empty), otherwise false.
Exception Type | Condition |
---|---|
ArgumentNullException | If the suffix is null. |
The EndsWith method compares a specified string with this instance, determines whether this instance is a suffix and returns a Boolean representation of their relationship. The comparison is case-sensitive.