[]
        
(Showing Draft Content)

SJS.ENDWITH

This function returns whether the text ends with the given string.

Syntax

=SJS.ENDWITH(text, searchString, [match_mode])

Arguments

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:

  • 0 : Case sensitive

  • 1 : Case insensitive

The default value is case-sensitive.

Examples

=SJS.ENDWITH("Little red Riding Hood's red hood","hood") // true

=SJS.ENDWITH("Little red Riding Hood's red hood","HOOD") // false

=SJS.ENDWITH("Little red Riding Hood's red hood","Hood", 1) // true

Errors

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.