Commit Graph

9 Commits

Author SHA1 Message Date
relrelb c0e84e646e wstr: Implement `ToOwned` for `WStr`
Similarly to how `str` implements `ToOwned`, and `From<&str> for String`
forwards to `to_owned()`.

This will allow defining `Cow<WStr>`.
2022-07-06 09:19:12 +03:00
relrelb f66159a387 wstr: Allow creating `Pattern` from `FnMut`
This aligns with Rust's standard `Pattern`:
https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html

Also rename `Predicate::is_match` to `matches` in order to appease
Clippy's `wrong-self-convention` lint, and anyway this is closer to
Rust's `MultiCharEq::matches`.
2022-06-21 08:02:40 +03:00
Mike Welsh 9d5e461278 core: Add WStr::eq_with_case 2022-05-09 17:39:49 -07:00
relrelb f6153ff7c1 chore: Appease clippy 2022-05-06 10:36:38 -07:00
Moulins 3bbbf2f764 wstr: make the crate no_std
This requires removing the Error impl of ParseNumError, because the
Error trait is std-only.
2022-03-26 13:42:57 -07:00
Moulins 1bff5c517a Move back AvmString into ruffle_core::string
This allows removing the gc_arena dependency in ruffle_wstr
2022-03-26 13:42:57 -07:00
Moulins bd576639d5 wstr: refactor traits macro (again) to make it usable outside the crate
And add the AsRef, Borrow, wstr::Pattern to the macro
2022-03-26 13:42:57 -07:00
Moulins 826708a91b wstr: refactor traits macro so that each wstr type uses it separately 2022-03-26 13:42:57 -07:00
Moulins 1911aa9a6b Move core::string into separate ruffle_wstr crate. 2022-03-26 13:42:57 -07:00