mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
add with_ascii_uppercased and caseless_ascii_equals to Str
This commit is contained in:
parent
690e690bb7
commit
fc0a9ec4cf
49 changed files with 1974 additions and 1673 deletions
|
@ -2244,3 +2244,27 @@ fn with_ascii_lowercased_non_zero_refcount() {
|
|||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
fn with_ascii_uppercased() {
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.with_ascii_uppercased("café")
|
||||
"#,
|
||||
RocStr::from("CAFé"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
fn caseless_ascii_equals() {
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.caseless_ascii_equals("CAfé", "caFé")
|
||||
"#,
|
||||
true,
|
||||
bool
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue