mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 14:40:18 +00:00
LibRegex: Rename a couple of RegexStringView methods for clarity
`operator[]` -> `code_point_at` `code_unit_at` -> `unicode_aware_code_point_at` `unicode_aware_code_point_at` returns either a code point or a code unit depending on the Unicode flag.
This commit is contained in:
parent
2dfcc4c307
commit
81fc8ab8cc
Notes:
github-actions[bot]
2025-07-21 21:45:38 +00:00
Author: https://github.com/trflynn89
Commit: 81fc8ab8cc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5550
Reviewed-by: https://github.com/alimpfard ✅
3 changed files with 24 additions and 24 deletions
|
@ -291,7 +291,7 @@ RegexResult Matcher<Parser>::match(Vector<RegexStringView> const& views, Optiona
|
|||
auto const insensitive = input.regex_options.has_flag_set(AllFlags::Insensitive);
|
||||
if (auto& starting_ranges = m_pattern->parser_result.optimization_data.starting_ranges; !starting_ranges.is_empty()) {
|
||||
auto ranges = insensitive ? m_pattern->parser_result.optimization_data.starting_ranges_insensitive.span() : starting_ranges.span();
|
||||
auto ch = input.view.code_unit_at(view_index);
|
||||
auto ch = input.view.unicode_aware_code_point_at(view_index);
|
||||
if (insensitive)
|
||||
ch = to_ascii_lowercase(ch);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue