View Source StringNaming (string_naming v0.7.3)
The sibling of String.Casing
,
String.Break
and String.Normalizer
from Elixir core.
It parses the NamesList.txt
file provided by Consortium, building
the set of nested modules under StringNaming
. Each nested module is granted with __all__/0
function that returns all the
available symbols in that particular namespace, as well as with methods returning a symbol by itโs name.
examples
Examples
iex> StringNaming.AnimalSymbols.monkey
"๐"
iex> StringNaming.FrakturSymbols.Mathematical.Fraktur.Capital.__all__
[a: "๐", b: "๐
", d: "๐", e: "๐", f: "๐", g: "๐", j: "๐",
k: "๐", l: "๐", m: "๐", n: "๐", o: "๐", p: "๐", q: "๐",
s: "๐", t: "๐", u: "๐", v: "๐", w: "๐", x: "๐", y: "๐"]
Link to this section Summary
Functions
Returns graphemes for modules that have names matching the regular expression given as a parameter. The response is a plain keyword list with names taken from concatenated nested module names.
Link to this section Functions
Returns graphemes for modules that have names matching the regular expression given as a parameter. The response is a plain keyword list with names taken from concatenated nested module names.
examples
Examples
iex> StringNaming.graphemes ~r/AnimalFace/
[
animalfaces_bear_face: "๐ป",
animalfaces_cat_face: "๐ฑ",
animalfaces_cow_face: "๐ฎ",
animalfaces_dog_face: "๐ถ",
animalfaces_dragon_face: "๐ฒ",
animalfaces_frog_face: "๐ธ",
animalfaces_hamster_face: "๐น",
animalfaces_horse_face: "๐ด",
animalfaces_monkey_face: "๐ต",
animalfaces_mouse_face: "๐ญ",
animalfaces_panda_face: "๐ผ",
animalfaces_pig_face: "๐ท",
animalfaces_pig_nose: "๐ฝ",
animalfaces_rabbit_face: "๐ฐ",
animalfaces_spouting_whale: "๐ณ",
animalfaces_tiger_face: "๐ฏ",
animalfaces_wolf_face: "๐บ"
]
iex> StringNaming.graphemes ~r/fraktur.small/i
[
fraktursymbols_mathematical_fraktur_small_a: "๐",
fraktursymbols_mathematical_fraktur_small_b: "๐",
fraktursymbols_mathematical_fraktur_small_c: "๐ ",
fraktursymbols_mathematical_fraktur_small_d: "๐ก",
fraktursymbols_mathematical_fraktur_small_e: "๐ข",
fraktursymbols_mathematical_fraktur_small_f: "๐ฃ",
fraktursymbols_mathematical_fraktur_small_g: "๐ค",
fraktursymbols_mathematical_fraktur_small_h: "๐ฅ",
fraktursymbols_mathematical_fraktur_small_i: "๐ฆ",
fraktursymbols_mathematical_fraktur_small_j: "๐ง",
fraktursymbols_mathematical_fraktur_small_k: "๐จ",
fraktursymbols_mathematical_fraktur_small_l: "๐ฉ",
fraktursymbols_mathematical_fraktur_small_m: "๐ช",
fraktursymbols_mathematical_fraktur_small_n: "๐ซ",
fraktursymbols_mathematical_fraktur_small_o: "๐ฌ",
fraktursymbols_mathematical_fraktur_small_p: "๐ญ",
fraktursymbols_mathematical_fraktur_small_q: "๐ฎ",
fraktursymbols_mathematical_fraktur_small_r: "๐ฏ",
fraktursymbols_mathematical_fraktur_small_s: "๐ฐ",
fraktursymbols_mathematical_fraktur_small_t: "๐ฑ",
fraktursymbols_mathematical_fraktur_small_u: "๐ฒ",
fraktursymbols_mathematical_fraktur_small_v: "๐ณ",
fraktursymbols_mathematical_fraktur_small_w: "๐ด",
fraktursymbols_mathematical_fraktur_small_x: "๐ต",
fraktursymbols_mathematical_fraktur_small_y: "๐ถ",
fraktursymbols_mathematical_fraktur_small_z: "๐ท"
]
iex> StringNaming.graphemes ~r/\Aspace/i, false
[
space_medium_mathematical_space: "โ",
space_narrow_no_break_space: "โฏ",
space_ogham_space_mark: "แ",
spaces_em_quad: "โ",
spaces_em_space: "โ",
spaces_en_quad: "โ",
spaces_en_space: "โ",
spaces_figure_space: "โ",
spaces_four_per_em_space: "โ
",
spaces_hair_space: "โ",
spaces_punctuation_space: "โ",
spaces_six_per_em_space: "โ",
spaces_thin_space: "โ",
spaces_three_per_em_space: "โ"
]