| Auto-Submit | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Have a slight reservation against the view+offset callback - I feel that having just the view (of the current/remaining string) might be easier to work with. I can see the argument for that this way may offer more performance benefits though, so I'm fine with it. I guess any future use will dictate improvements.
// This is not in string_intnernal.h because this should be visible fromTypo
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
// This is not in string_intnernal.h because this should be visible fromKent TamuraTypo
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
3 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: third_party/blink/renderer/platform/wtf/text/string_impl.h
Insertions: 1, Deletions: 1.
@@ -1049,7 +1049,7 @@
namespace internal {
-// This is not in string_intnernal.h because this should be visible from
+// This is not in string_internal.h because this should be visible from
// wtf_string.h and we don't want to include string_internal.h from
// wtf_string.h.
template <typename StringType, typename FinderType, bool allow_empty_entries>
```
WTF: Add String::Split*() methods taking a function predicate
This change introduces new overloads for `String::Split()` and
`String::SplitSkippingEmpty()` that accept a `Finder` function. This
addresses the long-standing TODO comment to refactor
`SplitOnASCIIWhitespace` into a more general `String::Split(predicate)`
method.
The new `Finder` function provides a highly flexible mechanism for
string splitting, allowing for:
- Custom separator definitions beyond a single character (e.g.,
multiple separators like "\\n" and "\\r\\n").
- Splitting based on arbitrary predicates (e.g., `IsHTMLSpace`).
- Splitting using zero-length separators to separate individual
characters.
As part of this change, `SplitOnASCIIWhitespace()` in
`html_parser_idioms.cc` is refactored to use the new
`SplitSkippingEmpty()` method, simplifying its implementation and
demonstrating the utility of the new generic splitting capabilities.
This CL should have no behavior changes.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |