Commit Graph

6 Commits

Author SHA1 Message Date
Moulins e9a16ff5fe wstr: cleanup and expose the `ptr` module
- move `WStr` declaration to `common`;
- move `MAX_STRING_LEN` to the `WStr` type;
- split `ptr` methods into `*const` and  `*mut` variants;
- add safe methods `WStrMetadata::new32/len32`;
- add `WString::{from, into}_raw_parts`.
2023-04-26 23:49:18 +02:00
Moulins 2d60e62b8b wstr: introduce explicit WStrMetadata type 2022-08-16 13:47:00 -07:00
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
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 1911aa9a6b Move core::string into separate ruffle_wstr crate. 2022-03-26 13:42:57 -07:00