aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter0_basics/lesson09_strings/en.html
blob: 8e4b6f7077af553e38791491bb537064f029cabe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<p>
  In Gleam strings are written as text surrounded by double quotes, and
  can span multiple lines and contain unicode characters.
</p>
<p>
  The <code>&lt;&gt;</code> operator can be used to concatenate strings.
</p>
<p>
  Several escape sequences are supported:
</p>
<ul>
  <li><code>\"</code> - double quote</li>
  <li><code>\\</code> - backslash</li>
  <li><code>\f</code> - form feed</li>
  <li><code>\n</code> - newline</li>
  <li><code>\r</code> - carriage return</li>
  <li><code>\t</code> - tab</li>
  <li><code>\u{xxxxxx}</code> - unicode codepoint</li>
</ul>
<p>
  The 
  <a href="https://hexdocs.pm/gleam_stdlib/gleam/string.html" target="_blank">
    <code>gleam/string</code>
  </a> 
  standard library module contains functions for working with strings.
</p>