Collation.SubstringBefore MethodCollation.SubstringBefore MethodCollation::SubstringBefore Method

Returns the substring of a stringStringString that precedes the first occurrence of the the specified substring.

Syntax

Public MustOverride Function SubstringBefore( _
    value As String, _
    substring As String _
) As String
public abstract string SubstringBefore(
    string value,
    string substring
)
public:
virtual String^ SubstringBefore(
    String^ value, 
    String^ substring
) abstract
 

Return Value

Type: System.StringSystem.StringSystem::String^

The substring of value that precedes the first occurrence of a sequence of collation units that provides a match to the collation units of substring.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException value or substring is null a null reference (Nothing in Visual Basic) nullptr.

Remarks

This method is called by the fn:substring-before function.