sema-docs 1.20.0

Canonical structured documentation for Sema builtins/special forms; powers LSP hover/completion and REPL apropos
Documentation
---
name: "string/from-codepoints"
module: "strings"
section: "Unicode & Encoding"
---

Construct a string from a list of Unicode codepoint integers. This is the inverse of `string/codepoints` and enables building emoji programmatically by combining codepoints.

```sema
(string/from-codepoints (list 65 66 67))   ; => "ABC"
(string/from-codepoints (list 233))        ; => "Γ©"
```

Build emoji by combining people with ZWJ (8205):

```sema
;; Build a family: πŸ‘¨ + ZWJ + πŸ‘© + ZWJ + πŸ‘§
(string/from-codepoints (list 128104 8205 128105 8205 128103))
;; => πŸ‘¨β€πŸ‘©β€πŸ‘§

;; Build a profession: πŸ‘© + ZWJ + πŸ’»
(string/from-codepoints (list 128105 8205 128187))
;; => πŸ‘©β€πŸ’»

;; Add skin tone: πŸ‘‹ + modifier
(string/from-codepoints (list 128075 127997))
;; => πŸ‘‹πŸ½

;; Build flags from Regional Indicators (A=127462):
(string/from-codepoints (list 127475 127476))
;; => πŸ‡³πŸ‡΄ (NO = Norway)
```

Roundtrip any string through codepoints:

```sema
(string/from-codepoints (string/codepoints "Hello δΈ–η•Œ"))
;; => "Hello δΈ–η•Œ"
```