characters
Returns the list of all characters in a string.
Syntax
-
characters(s)
-
s
is a string
-
Description
If s
is a string, then characters(s)
is the (ordered) list of all characters of s
.
Exmples
Alice ≔ ExampleData("Alice in Wonderland") \ 50
ALICE’S ADVENTURES IN WONDERLAND Lewis Carroll …
SortBy(frequencies(filter(characters(UpperCase(Alice)), ChrIsLetter)), (x ↦ −x[2]))
(E, 13576) (T, 10689) (A, 8791) (O, 8145) (I, 7515) (H, 7375) (N, 7016) (S, 6501) (R, 5438) (D, 4931) (L, 4716) (U, 3468) (W, 2676) (G, 2531) (C, 2399) (Y, 2262) (M, 2107) (F, 2001) (P, 1524) (B, 1475) (K, 1158) (V, 846) (Q, 209) (X, 148) (J, 146) (Z, 78)