Skip to content

Commit

Permalink
run formatter, change Str.dropPrefix to snake_case in failing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
HajagosNorbert committed Jan 10, 2025
1 parent c42d8bf commit 1266186
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/compiler/builtins/roc/Str.roc
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,6 @@ drop_suffix = \haystack, suffix ->
## That said, strings received from user input can always contain non-ASCII Unicode characters, and lowercasing [Unicode](https://unicode.org) works differently in different languages. For example, the string `"I"lowercases to `"i"## ` in English and to `"ı"` (a [dotless i](https://en.wikipedia.org/wiki/Dotless_I)) in Turkish. These rules can also change in each [Unicode release](https://www.unicode.org/releases/), so we have separate [`unicode` package]## (https://github.com/roc-lang/unicode) for Unicode capitalization that can be upgraded independently from the language's builtins.
##
## To do a case-insensitive comparison of the ASCII characters in a string, use [`caseless_ascii_equals`](#caseless_ascii_equals).
with_ascii_lowercased: Str -> Str
with_ascii_lowercased : Str -> Str

expect Str.with_ascii_lowercased "cOFFÉ" == "XYZFÉ"
2 changes: 1 addition & 1 deletion crates/compiler/test_gen/src/gen_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ fn with_ascii_lowercased_non_zero_refcount() {
r#"
original = "cOFFÉ cOFFÉ cOFFÉ cOFFÉ cOFFÉ cOFFÉ cOFFÉ cOFFÉ cOFFÉ cOFFÉ cOFFÉ cOFFÉ"
res = Str.with_ascii_lowercased original
Str.dropPrefix res original
Str.drop_prefix res original
"#,
RocStr::from("coffÉ coffÉ coffÉ coffÉ coffÉ coffÉ coffÉ coffÉ coffÉ coffÉ coffÉ coffÉ"),
RocStr
Expand Down

0 comments on commit 1266186

Please sign in to comment.