Commit Graph

8 Commits

Author SHA1 Message Date
Nathan Adams 7309e457d5 avm2: Transform css properties from with-dashes to snakeCase 2024-05-14 21:03:37 +02:00
Kamil Jarosz b39919951b wstr: Add UTF-8/UTF-16 index mapping
Methods `utf8_index` and `utf16_index` from `WStrToUtf8`
may be used to map code unit indices between UTF-8 (str)
and UTF-16 (WStr) strings.
2024-02-01 20:18:29 +01:00
Nathan Adams 658ac2dd9f core: Implement url handling (+asfunction) in textedits 2023-08-20 22:31:27 +02:00
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 604a15f957 wstr: add `WStr::make_ascii_lowercase` 2023-04-26 23:49:18 +02:00
Moulins 5b4096de8b wstr: Revert incorrect optimization in hash calculation
Calling `Hash::write_bytes` isn't guaranteed to be equivalent to a
sequence of `Hash::write_u8`.

Additionally, make sure the hash is truly prefix-free by hashing the
length first.
2023-03-25 18:27:51 -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 1911aa9a6b Move core::string into separate ruffle_wstr crate. 2022-03-26 13:42:57 -07:00