We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82559e9 commit a785f86Copy full SHA for a785f86
src/gleam/string.gleam
@@ -901,6 +901,13 @@ fn do_inspect(term term: anything) -> StringBuilder
901
/// This function runs in constant time on Erlang and in linear time on
902
/// JavaScript.
903
///
904
+/// ## Examples
905
+///
906
+/// ```gleam
907
+/// > byte_size("🏳️⚧️🏳️🌈👩🏾❤️👨🏻")
908
+/// 58
909
+/// ```
910
911
@external(erlang, "erlang", "byte_size")
912
@external(javascript, "../gleam_stdlib.mjs", "byte_size")
913
pub fn byte_size(string: String) -> Int
0 commit comments