瀏覽代碼

LibUnicode: Remove non-iterative text segmentation algorithms

They are now unused.
Timothy Flynn 2 年之前
父節點
當前提交
32a01a60e7
共有 1 個文件被更改,包括 0 次插入40 次删除
  1. 0 40
      Userland/Libraries/LibUnicode/Segmentation.h

+ 0 - 40
Userland/Libraries/LibUnicode/Segmentation.h

@@ -12,7 +12,6 @@
 #include <AK/IterationDecision.h>
 #include <AK/Optional.h>
 #include <AK/Types.h>
-#include <AK/Vector.h>
 
 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<typename ViewType>
-Vector<size_t> find_grapheme_segmentation_boundaries(ViewType const& view)
-{
-    Vector<size_t> boundaries;
-
-    for_each_grapheme_segmentation_boundary(view, [&](auto boundary) {
-        boundaries.append(boundary);
-        return IterationDecision::Continue;
-    });
-
-    return boundaries;
-}
-
 template<typename ViewType>
 Optional<size_t> 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<typename ViewType>
-Vector<size_t> find_word_segmentation_boundaries(ViewType const& view)
-{
-    Vector<size_t> boundaries;
-
-    for_each_word_segmentation_boundary(view, [&](auto boundary) {
-        boundaries.append(boundary);
-        return IterationDecision::Continue;
-    });
-
-    return boundaries;
-}
-
 template<typename ViewType>
 Optional<size_t> 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<typename ViewType>
-Vector<size_t> find_sentence_segmentation_boundaries(ViewType const& view)
-{
-    Vector<size_t> boundaries;
-
-    for_each_sentence_segmentation_boundary(view, [&](auto boundary) {
-        boundaries.append(boundary);
-        return IterationDecision::Continue;
-    });
-
-    return boundaries;
-}
-
 template<typename ViewType>
 Optional<size_t> next_sentence_segmentation_boundary(ViewType const& view, size_t index)
 {