[]
This function returns whether the text starts with the given string.
=SJS.STARTWITH(text, searchString, [match_mode])
This function has the following arguments:
Argument | Description |
---|---|
text | [Required] The piece of text you want to process. |
searchString | [Required] Use this text to match the original text, whether it is the ending text of the original text, no wildcards are allowed. |
match_mode | [Optional] Determines whether the text match is case-sensitive or not. It can be set as follows:
The default value is case-sensitive. |
=SJS.STARTWITH("Little red Riding Hood's red hood","Little") // true
=SJS.STARTWITH("Little red Riding Hood's red hood","LITTLE") // false
=SJS.STARTWITH("Little red Riding Hood's red hood","LITTLE", 1) // true
This returns a #N/A! error if any of the following conditions is true:
text.length = 0
searchString.length = 0
searchString is greater than the length of the text.