diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-07 17:34:47 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-07 17:34:51 -0800 |
commit | d7389e15a86b2c9d6a35c578c325ee2c0dfa3926 (patch) | |
tree | cc78a7aad366dc1f4e4fc127f85f07300b0255b7 /vocabulary.md | |
parent | 3ca102f0152f23718b72b35207e9272daf7514c3 (diff) | |
download | mu-d7389e15a86b2c9d6a35c578c325ee2c0dfa3926.tar.gz |
task 16: addressing sejo's feedback
I'm still not quite happy with this..
Diffstat (limited to 'vocabulary.md')
-rw-r--r-- | vocabulary.md | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vocabulary.md b/vocabulary.md index f02b7fd3..27c9ea5f 100644 --- a/vocabulary.md +++ b/vocabulary.md @@ -43,6 +43,10 @@ how they work under the hood. - Code-points: integer representing a Unicode character. Must be representable in 32 bits as utf-8; largest supported value is 0x10000. +Mu will let you convert between bytes, graphemes and code-points using `copy`, +and trust that you know what you're doing. Be aware that doing so is only +correct for English/Latin characters, digits and symbols. + ### Functions The most useful functions from 400.mu and later .mu files. Look in @@ -133,7 +137,7 @@ signatures.mu for their full type signatures. - `parse-decimal-int-from-slice` - `parse-decimal-int-from-stream` - `parse-array-of-decimal-ints` -- `decimal-digit?`: checks if byte is in [0, 9] +- `decimal-digit?`: checks if a grapheme is in [0, 9] #### printing to screen @@ -250,7 +254,8 @@ Assertions for tests: #### events `read-key` reads a single key from the keyboard and returns it if it exists. -Returns 0 if no key has been pressed. +Returns 0 if no key has been pressed. Currently only support single-byte keys, +which are identical to their code-point and grapheme representations. `read-line-from-keyboard` reads keys from keyboard, echoes them to screen (with given fg/bg colors) and accumulates them in a stream until it encounters |