From 83b15f23a643a44bf0a89ab359d94b09a4bf3918 Mon Sep 17 00:00:00 2001 From: inoas Date: Tue, 29 Nov 2022 07:25:48 +0100 Subject: add string.{to_utf_codepoints, from_utf_codepoints} --- src/gleam/string.gleam | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') 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: . +/// See and +/// 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: . +/// See and +/// for an +/// explanation on code points. /// /// ## Examples /// -- cgit v1.2.3