yields True if the end of string matches the string pattern patt, and yields False otherwise.


gives a list of the results for each of the stringi.


represents an operator form of StringEndsQ that can be applied to an expression.

Details and Options

  • The string expression patt can contain any of the objects specified in the notes for StringExpression.
  • Setting the option IgnoreCase->True makes StringEndsQ treat lowercase and uppercase letters as equivalent.
  • StringEndsQ[patt][expr] is equivalent to StringEndsQ[expr,patt].
  • StringEndsQ[BioSequence["type","seq"],patt] checks the end of the string "seq" against patt. In this case, degenerate letters in patt are interpreted as wildcard patterns based on the type of biomolecular sequence. Use Verbatim["patt"] to match degenerate letters literally.
  • The documentation for BioSequence lists the degenerate letters supported by each type of biomolecular sequence.
  • StringEndsQ has no special behavior for circular biomolecular sequences, but instead interprets the end of the string as the designated end of the sequence.


open allclose all

Basic Examples  (4)

Check that a string ends with a given suffix:

Give a list of strings as input:

Specify a suffix using a string pattern:

Map the operator form over a list:

Use the operator form to select strings:

Scope  (3)

Check whether a biomolecular sequence ends in a particular sequence:

Use a wildcard in the pattern compared against a biomolecular sequence:

The "S" is a degenerate letter:

Check for literal degenerate letters using Verbatim:

Options  (1)

IgnoreCase  (1)

Check a suffix regardless of case:

Wolfram Research (2015), StringEndsQ, Wolfram Language function, (updated 2020).


Wolfram Research (2015), StringEndsQ, Wolfram Language function, (updated 2020).


Wolfram Language. 2015. "StringEndsQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020.


Wolfram Language. (2015). StringEndsQ. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2022_stringendsq, author="Wolfram Research", title="{StringEndsQ}", year="2020", howpublished="\url{}", note=[Accessed: 04-October-2022 ]}


@online{reference.wolfram_2022_stringendsq, organization={Wolfram Research}, title={StringEndsQ}, year={2020}, url={}, note=[Accessed: 04-October-2022 ]}