From 663729b8a619d1076fda8953abdb06070a786269 Mon Sep 17 00:00:00 2001 From: inoas Date: Sun, 4 Dec 2022 19:39:37 +0100 Subject: add string.to_ints --- test/gleam/string_test.gleam | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index 2092b8b..37671d3 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -510,6 +510,16 @@ pub fn bit_string_utf_codepoint_test() { should.equal(<>, <<"🐍":utf8>>) } +pub fn to_ints_test() { + "abc" + |> string.to_ints + |> should.equal([97, 98, 99]) + + "🐍" + |> string.to_ints + |> should.equal([128013]) +} + pub fn to_option_test() { "" |> string.to_option -- cgit v1.2.3