~/talk

Strings in swift

Talkat iOS Conf SG 2017 · 2017-10-19..10-20· [swift]
slides:none on file

Explains that Unicode assigns code points but encoding is variable‑length so utf-8 view uses 1–4 bytes (example string totals 11 bytes: W 1, é 2, 💜 4, 📱 4), and visually single characters are grapheme clusters which can combine multiple scalars. Swift strings are Unicode‑aware, normalize for equality, expose utf8/utf16/scalars/characters views, use copy-on-write and substrings that share storage (beware long‑lived substring memory retention). Complexity: count/index O(n), append amortized O(1), copy O(1). Also covers bidirectional text and direction markers (U+200E/U+200F).

AI-written summary · about

  1. 0:00The complexity of strings
  2. 2:23Defining string problems
  3. 3:52History and Unicode
  4. 6:24UTF-8 encoding explained
  5. 9:41Grapheme clusters
  6. 14:01Bi-directional text
  7. 19:18Swift string design
  8. 22:30Performance optimizations
  9. 26:43Concluding thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.