Fix Str.startsWithCodePoint docs

This commit is contained in:
Richard Feldman 2021-05-02 22:16:58 -04:00
parent 465c5fa18a
commit 83dde26cd0
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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
);