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 f7defd3 commit 665be26Copy full SHA for 665be26
CHANGELOG.md
@@ -4,6 +4,7 @@
4
5
- The `compare` and `to_int` functions from the `gleam/bool` module have been
6
deprecated.
7
+- Fixed a bug where `string.utf_codepoint` would erronously accept negative input.
8
9
## v0.46.0 - 2024-12-08
10
test/gleam/string_test.gleam
@@ -706,6 +706,9 @@ pub fn utf_codepoint_test() {
706
707
string.utf_codepoint(55_296)
708
|> should.be_error
709
+
710
+ string.utf_codepoint(-1)
711
+ |> should.be_error
712
}
713
714
pub fn bit_array_utf_codepoint_test() {
0 commit comments