diff --git a/compiler/builtins/docs/Str.roc b/compiler/builtins/docs/Str.roc index 5e5c258c4c..5313cac60b 100644 --- a/compiler/builtins/docs/Str.roc +++ b/compiler/builtins/docs/Str.roc @@ -161,8 +161,8 @@ startsWith : Str, Str -> Bool ## in a single code point, you can use (for example) `Str.startsWithCodePoint '鹏'` ## instead of `Str.startsWithCodePoint "鹏"`. ('鹏' evaluates to the [U32] ## value `40527`.) This will not work for graphemes which take up mulitple code -## points, however; `Str.startsWithCodePoint '🕊'` would be a compiler error -## because 🕊 takes up multiple code points and cannot be represented as a +## points, however; `Str.startsWithCodePoint '👩‍👩‍👦‍👦'` would be a compiler error +## because 👩‍👩‍👦‍👦 takes up multiple code points and cannot be represented as a ## single [U32]. You'd need to use `Str.startsWithCodePoint "🕊"` instead. startsWithCodePoint : Str, U32 -> Bool diff --git a/compiler/test_gen/src/gen_str.rs b/compiler/test_gen/src/gen_str.rs index 9c0468d4d2..583c78772d 100644 --- a/compiler/test_gen/src/gen_str.rs +++ b/compiler/test_gen/src/gen_str.rs @@ -428,7 +428,7 @@ fn str_starts_with_code_point() { bool ); assert_evals_to!( - &format!(r#"Str.startsWithCodePoint "boobar" {}"#, 'f' as u32), + &format!(r#"Str.startsWithCodePoint "zoobar" {}"#, 'f' as u32), false, bool );