AlphabeticOrder

AlphabeticOrder["string1","string2"]

gives 1 if "string1" appears before "string2" in alphabetical order, -1 if it is after, and 0 if it is identical.

AlphabeticOrder["string1","string2",lang]

uses an ordering suitable for the language lang.

AlphabeticOrder[lang]

represents an operator form that compares strings when applied to "string1", "string2".

Details and Options

Examples

open allclose all

Basic Examples  (3)

Check the order of two characters:

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

Specify a language as the third argument:

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

When digraphs exist in a language, they are equivalent to corresponding pairs of ASCII characters:

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

Scope  (4)

Options  (8)

Applications  (2)

Properties & Relations  (4)

Possible Issues  (1)

Neat Examples  (1)

See Also

AlphabeticSort  Order  Alphabet  LanguageData

Introduced in 2015
(10.3)