diff options
author | inoas <mail@inoas.com> | 2022-11-29 07:25:48 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2022-12-22 20:44:33 +0000 |
commit | 83b15f23a643a44bf0a89ab359d94b09a4bf3918 (patch) | |
tree | 9ab0d886bd7dc0abf867f74d23faca6f312165ad | |
parent | 0d7e9c0a6741029d63b78cdab5a6b690ab5a9669 (diff) | |
download | gleam_stdlib-83b15f23a643a44bf0a89ab359d94b09a4bf3918.tar.gz gleam_stdlib-83b15f23a643a44bf0a89ab359d94b09a4bf3918.zip |
add string.{to_utf_codepoints, from_utf_codepoints}
-rw-r--r-- | src/gleam/string.gleam | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam index 099d7b1..7a7439c 100644 --- a/src/gleam/string.gleam +++ b/src/gleam/string.gleam @@ -778,7 +778,9 @@ if javascript { /// Converts a `String` to a `List` of `UtfCodepoint`. /// -/// Also see: <https://en.wikipedia.org/wiki/Unicode#Codespace_and_CodePoints>. +/// See <https://en.wikipedia.org/wiki/Code_point> and +/// <https://en.wikipedia.org/wiki/Unicode#Codespace_and_CodePoints> for an +/// explanation on code points. /// /// ## Examples /// @@ -788,7 +790,9 @@ if javascript { /// ``` /// /// ```gleam -/// // aka ["🏳", "️", "", "🌈"] aka [waving_white_flag, variant_selector_16, zero_width_joiner, rainbow] +/// // Semantically the same as: +/// // ["🏳", "️", "", "🌈"] or: +/// // [waving_white_flag, variant_selector_16, zero_width_joiner, rainbow] /// > "🏳️🌈" |> to_utf_codepoints /// [UtfCodepoint(127987), UtfCodepoint(65039), UtfCodepoint(8205), UtfCodepoint(127752)] /// ``` @@ -828,7 +832,9 @@ if javascript { /// Converts a `List` of `UtfCodepoint`s to a `String`. /// -/// Also see: <https://en.wikipedia.org/wiki/Unicode#Codespace_and_CodePoints>. +/// See <https://en.wikipedia.org/wiki/Code_point> and +/// <https://en.wikipedia.org/wiki/Unicode#Codespace_and_CodePoints> for an +/// explanation on code points. /// /// ## Examples /// |