aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter2_flow_control/lesson03_string_patterns/en.html
blob: 11e4c35c03f88bcfdfd742f8ee658b879cfdab60 (plain)
1
2
3
4
5
6
7
8
9
<p>
  When pattern matching on strings the <code>&lt;&gt;</code> operator can be
  used to match on strings with a specific prefix.
</p>
<p>
  The pattern <code>"hello " <> name</code> matches any string that starts with
  <code>"hello "</code> and assigns the rest of the string to the variable
  <code>name</code>.
</p>