description | title |
---|---|
Learn more about: Text.StartsWith |
Text.StartsWith |
Text.StartsWith(text as nullable text, substring as text, optional comparer as nullable function) as nullable logical
Returns true if text value text
starts with text value substring
.
text
: Atext
value which is to be searchedsubstring
: Atext
value which is the substring to be searched for insubstring
comparer
: [Optional] AComparer
used for controlling the comparison. For example,Comparer.OrdinalIgnoreCase
may be used to perform case-insensitive searches
comparer
is a Comparer
which is used to control the comparison. Comparers can be used to provide case-insensitive or culture and locale-aware comparisons.
The following built-in comparers are available in the formula language:
Comparer.Ordinal
: Used to perform an exact ordinal comparisonComparer.OrdinalIgnoreCase
: Used to perform an exact ordinal case-insensitive comparisonComparer.FromCulture
: Used to perform a culture-aware comparison
Check if the text "Hello, World" starts with the text "hello".
Usage
Text.StartsWith("Hello, World", "hello")
Output
false
Check if the text "Hello, World" starts with the text "Hello".
Usage
Text.StartsWith("Hello, World", "Hello")
Output
true