Strings, Binaries & Sigils in Elixir
Explore how Elixir represents text as UTF-8 binaries and use sigils to write strings, lists, and regexes concisely.
Strings Are UTF-8 Binaries
An Elixir string is a UTF-8 binary in double quotes — not a list of characters. Keep that distinction in mind.
name = "Elixir"
IO.puts(name)String Concatenation
Join two strings with <>, which concatenates the underlying binaries.
greeting = "Hello, " <> "World"
IO.puts(greeting)All lessons in this course
- Introduction to Elixir Language
- Basic Data Types and Operators
- Pattern Matching and Control Flow
- Strings, Binaries & Sigils in Elixir