From 32a01a60e7cc482c9d2fd837c8d91833c2255740 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 15 Feb 2023 10:15:19 -0500 Subject: [PATCH] LibUnicode: Remove non-iterative text segmentation algorithms They are now unused. --- Userland/Libraries/LibUnicode/Segmentation.h | 40 -------------------- 1 file changed, 40 deletions(-) diff --git a/Userland/Libraries/LibUnicode/Segmentation.h b/Userland/Libraries/LibUnicode/Segmentation.h index 126e5db78c..95a0ed321a 100644 --- a/Userland/Libraries/LibUnicode/Segmentation.h +++ b/Userland/Libraries/LibUnicode/Segmentation.h @@ -12,7 +12,6 @@ #include #include #include -#include namespace Unicode { @@ -22,19 +21,6 @@ void for_each_grapheme_segmentation_boundary(Utf8View const&, SegmentationCallba void for_each_grapheme_segmentation_boundary(Utf16View const&, SegmentationCallback); void for_each_grapheme_segmentation_boundary(Utf32View const&, SegmentationCallback); -template -Vector find_grapheme_segmentation_boundaries(ViewType const& view) -{ - Vector boundaries; - - for_each_grapheme_segmentation_boundary(view, [&](auto boundary) { - boundaries.append(boundary); - return IterationDecision::Continue; - }); - - return boundaries; -} - template Optional next_grapheme_segmentation_boundary(ViewType const& view, size_t index) { @@ -73,19 +59,6 @@ void for_each_word_segmentation_boundary(Utf8View const&, SegmentationCallback); void for_each_word_segmentation_boundary(Utf16View const&, SegmentationCallback); void for_each_word_segmentation_boundary(Utf32View const&, SegmentationCallback); -template -Vector find_word_segmentation_boundaries(ViewType const& view) -{ - Vector boundaries; - - for_each_word_segmentation_boundary(view, [&](auto boundary) { - boundaries.append(boundary); - return IterationDecision::Continue; - }); - - return boundaries; -} - template Optional next_word_segmentation_boundary(ViewType const& view, size_t index) { @@ -124,19 +97,6 @@ void for_each_sentence_segmentation_boundary(Utf8View const&, SegmentationCallba void for_each_sentence_segmentation_boundary(Utf16View const&, SegmentationCallback); void for_each_sentence_segmentation_boundary(Utf32View const&, SegmentationCallback); -template -Vector find_sentence_segmentation_boundaries(ViewType const& view) -{ - Vector boundaries; - - for_each_sentence_segmentation_boundary(view, [&](auto boundary) { - boundaries.append(boundary); - return IterationDecision::Continue; - }); - - return boundaries; -} - template Optional next_sentence_segmentation_boundary(ViewType const& view, size_t index) {