#elixir
Strings in Elixir are represented internally by contiguous sequences of bytes known as binaries:
iex > is_binary ( "hellö" ) true
If you want to change selection, open document below and click on "Move attachment"
Basic types - The Elixir programming language" You can print a string using the IO.puts/1 function from the IO module: iex> IO.puts("hello\nworld") hello world :ok Notice that the IO.puts/1 function returns the atom :ok after printing. <span>Strings in Elixir are represented internally by contiguous sequences of bytes known as binaries: iex> is_binary("hellö") true We can also get the number of bytes in a string: iex> byte_size("hellö") 6 Notice that the number of bytes in that string is 6, even though it has 5 graphemes. That’s because the gra Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details