edubkendo
8/28/2014 - 5:21 AM

Elixir sigil cheatsheet

Elixir sigil cheatsheet

The letter determines the sigil’s type:

  • ~C a character list with no escaping or interpolation
  • ~c a character list, escaped and interpolated just like a single quoted string ~R a regular expression with no escaping or interpolation
  • ~r a regular expression, escaped and interpolated
  • ~S string with no escaping or interpolation
  • ~s string, escaped and interpolated just like a double quoted string
  • ~W a list of whitespace-delimited words, with no escaping or interpolation ~w a list of whitespace-delimited words, with escaping and interpolation