Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

StringEndsQ

StringEndsQ["string",patt]
yields True if the end of string matches the string pattern patt, and yields False otherwise.

StringEndsQ[{"string1","string2",},patt]
gives a list of the results for each of the stringi.

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

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Check that a string ends with a given suffix:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Give a list of strings as input:

In[1]:=
Click for copyable input
Out[1]=

Specify a suffix using a string pattern:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Map the operator form over a list:

In[1]:=
Click for copyable input
Out[1]=

Use the operator form to select strings:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2015
(10.1)