Concatenation ( <> )
Try it yourself →Concatenates two strings.
Syntax
text <> text
Description
Text concatenation in Elixir is done with <>. Convert numbers to text first or embed them with #{}.
Example
name = "Hex" IO.puts(name <> "Library")
Expected output
HexLibrary
When to use?
Creating strings.
Common mistakes
- ⚠️ + does not concatenate text; use <>.