# String

```elixir
"hello"
"string" <> "concat"

x = 123
x <> "hi" #error
"#{x}hi" #123hi
```

String.reverse(str)

String.upcase(str)

String.downcase(str)

String.capitalize(str)

String.starts\_with?(str)

String.contains?(str, "search\_str")

String.first(str)

String.at(str, index)

String.slice(str, start\_index, end\_index)

String.split("foo bar", "")

String.length("foo bar")

### Atoms

An atom is a constant whose value is its own name

`true`, `false`, and `nil` are atoms, but can skip `:`

```elixir
:apple
:ok != :error
:true == true
is_atom(false) # => true
true and true
false or not true
1 and true # => raises exception
Atom.to_string(:foo) 
```

_Atoms are not garbage collected, so never convert user input to atoms_
