mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00:00
AK: Bring some missing DeprecatedString API over to String
Specifically, case sensitivity parameters for starts/ends with, and the equals_ignoring_ascii_case() helper.
This commit is contained in:
parent
f052823f5f
commit
0902f552a3
Notes:
sideshowbarker
2024-07-16 20:08:14 +09:00
Author: https://github.com/awesomekling
Commit: 0902f552a3
2 changed files with 13 additions and 6 deletions
|
@ -101,11 +101,13 @@ public:
|
|||
// Compare this String against another string with caseless matching. Using this method requires linking LibUnicode into your application.
|
||||
[[nodiscard]] bool equals_ignoring_case(String const&) const;
|
||||
|
||||
[[nodiscard]] bool equals_ignoring_ascii_case(StringView) const;
|
||||
|
||||
[[nodiscard]] bool starts_with(u32 code_point) const;
|
||||
[[nodiscard]] bool starts_with_bytes(StringView) const;
|
||||
[[nodiscard]] bool starts_with_bytes(StringView, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
|
||||
|
||||
[[nodiscard]] bool ends_with(u32 code_point) const;
|
||||
[[nodiscard]] bool ends_with_bytes(StringView) const;
|
||||
[[nodiscard]] bool ends_with_bytes(StringView, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
|
||||
|
||||
// Creates a substring with a deep copy of the specified data window.
|
||||
ErrorOr<String> substring_from_byte_offset(size_t start, size_t byte_count) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue