WLJS LogoWLJS Notebook

LetterNumber

LetterNumber["c"] gives the position of the character c in the English alphabet.

LetterNumber["c",alpha] gives the position of c in the alphabet specified by alpha.

LetterNumber["string",…] gives a list of the positions of characters in string.

Examples

Get the position of a letter:

LetterNumber["d"]
(* 4 *)

Get positions for a string:

LetterNumber["hello"]
(* {8, 5, 12, 12, 15} *)

Please visit the official Wolfram Language Reference for more details.

On this page