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

Link to this function

graphemes(filter, modules_only? \\ true)

View Source

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: "โ€„"
]