mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibJS: Implement the Intl.Segmenter FindBoundary AO
This commit is contained in:
parent
b1d19b5917
commit
cea6c81c77
Notes:
sideshowbarker
2024-07-17 19:54:53 +09:00
Author: https://github.com/IdanHo
Commit: cea6c81c77
Pull-request: https://github.com/SerenityOS/serenity/pull/12229
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 82 additions and 0 deletions
|
@ -36,4 +36,10 @@ private:
|
|||
SegmenterGranularity m_segmenter_granularity { SegmenterGranularity::Grapheme }; // [[SegmenterGranularity]]
|
||||
};
|
||||
|
||||
enum class Direction {
|
||||
Before,
|
||||
After,
|
||||
};
|
||||
double find_boundary(Segmenter const&, Utf16View const&, double start_index, Direction, Optional<Vector<size_t>>& boundaries_cache);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue