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


uses an ordering suitable for the language lang.


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

Details and Options


open allclose all

Basic Examples  (3)

Check the order of two characters:

Specify a language as the third argument:

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

Scope  (4)

AlphabeticOrder operates over single characters or longer strings:

Use the operator form:

Specify a language in operator form:

Use options in operator form:

Options  (8)

CaseOrdering  (2)

CaseOrdering->"LowerFirst" orders lowercase before uppercase letters. It is the default for most languages:

CaseOrdering->"UpperFirst" orders uppercase before lowercase letters:

IgnoreCase  (2)

With IgnoreCase->True, comparisons are case insensitive:

Equivalence between lower case and upper case can vary by language:

IgnoreDiacritics  (3)

With IgnoreDiacritics->True, comparisons are based only on basic letters from the alphabet:

When characters with diacritics are considered to be a fundamental part of a given alphabet, IgnoreDiacritics will not affect those characters:

The IgnoreDiacritics option can be mixed with any other option, such as IgnoreCase:

IgnorePunctuation  (1)

With IgnorePunctuation->True, punctuation characters are removed before comparing the strings:

Applications  (2)

Sort the Japanese names of countries with Wolfram offices:

When digraphs are part of a language, they will be ordered correctly (as in Slovak, where "ch" is after "h"):

Properties & Relations  (4)

Use the operator form of AlphabeticOrder to confirm that Alphabet of the same language is already ordered:

The results from AlphabeticOrder and Order may differ for non-English languages:

For some languages, using IgnoreDiacritics may give a different result than applying RemoveDiacritics first:

AlphabeticSort uses AlphabeticOrder as its ordering function:

Possible Issues  (1)

Different characters that represent the same letter in some languages are considered exact equivalents:

Neat Examples  (1)

Find all Unicode characters considered equivalent to "a" without taking into account diacritics or case:

Sort alphabetically:

Split by case:

Wolfram Research (2015), AlphabeticOrder, Wolfram Language function,


Wolfram Research (2015), AlphabeticOrder, Wolfram Language function,


@misc{reference.wolfram_2020_alphabeticorder, author="Wolfram Research", title="{AlphabeticOrder}", year="2015", howpublished="\url{}", note=[Accessed: 18-April-2021 ]}


@online{reference.wolfram_2020_alphabeticorder, organization={Wolfram Research}, title={AlphabeticOrder}, year={2015}, url={}, note=[Accessed: 18-April-2021 ]}


Wolfram Language. 2015. "AlphabeticOrder." Wolfram Language & System Documentation Center. Wolfram Research.


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