Text.StartsWith
Indicates whether the text starts with a specified value.
function (optionaltext
as nullable any,substring
as text, optionalcomparer
as nullable function) as nullable any
Returns true if text value
text
starts with text value substring
. <div>
<code>comparer</code> is a <code>Comparer</code> which is used to control the comparison. Comparers can be used to provide case insensitive or culture and locale aware comparisons.
</div>
<div>
The following built in comparers are available in the formula language:
</div>
<ul>
<li><code>Comparer.Ordinal</code>: Used to perform an exact ordinal comparison</li>
<li><code>Comparer.OrdinalIgnoreCase</code>: Used to perform an exact ordinal case-insensitive comparison</li>
<li> <code>Comparer.FromCulture</code>: Used to perform a culture aware comparison</li>
Text.Membership
Check if the text "Hello, World" starts with the text "hello".
Text.StartsWith("Hello, World", "hello")
false
Check if the text "Hello, World" starts with the text "Hello".
Text.StartsWith("Hello, World", "Hello")
true
Last modified 4yr ago