1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
``segmenter_line::ffi``
=======================
.. cpp:class:: ICU4XLineBreakIteratorLatin1
See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorLatin1.html>`__
.. cpp:function:: int32_t next()
Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
.. cpp:class:: ICU4XLineBreakIteratorUtf16
See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorUtf16.html>`__
.. cpp:function:: int32_t next()
Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
.. cpp:class:: ICU4XLineBreakIteratorUtf8
See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorPotentiallyIllFormedUtf8.html>`__
.. cpp:function:: int32_t next()
Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
.. cpp:struct:: ICU4XLineBreakOptionsV1
See the `Rust documentation for LineBreakOptions <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakOptions.html>`__ for more information.
.. cpp:member:: ICU4XLineBreakStrictness strictness
.. cpp:member:: ICU4XLineBreakWordOption word_option
.. cpp:member:: bool ja_zh
.. cpp:enum-struct:: ICU4XLineBreakStrictness
See the `Rust documentation for LineBreakStrictness <https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakStrictness.html>`__ for more information.
.. cpp:enumerator:: Loose
.. cpp:enumerator:: Normal
.. cpp:enumerator:: Strict
.. cpp:enumerator:: Anywhere
.. cpp:enum-struct:: ICU4XLineBreakWordOption
See the `Rust documentation for LineBreakWordOption <https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakWordOption.html>`__ for more information.
.. cpp:enumerator:: Normal
.. cpp:enumerator:: BreakAll
.. cpp:enumerator:: KeepAll
.. cpp:class:: ICU4XLineSegmenter
An ICU4X line-break segmenter, capable of finding breakpoints in strings.
See the `Rust documentation for LineSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html>`__ for more information.
.. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_auto(const ICU4XDataProvider& provider)
Construct a :cpp:class:`ICU4XLineSegmenter` with default options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
See the `Rust documentation for new_auto <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto>`__ for more information.
.. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_lstm(const ICU4XDataProvider& provider)
Construct a :cpp:class:`ICU4XLineSegmenter` with default options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
See the `Rust documentation for new_lstm <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm>`__ for more information.
.. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_dictionary(const ICU4XDataProvider& provider)
Construct a :cpp:class:`ICU4XLineSegmenter` with default options and dictionary payload data for Burmese, Khmer, Lao, and Thai..
See the `Rust documentation for new_dictionary <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary>`__ for more information.
.. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_auto_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options)
Construct a :cpp:class:`ICU4XLineSegmenter` with custom options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
See the `Rust documentation for new_auto_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto_with_options>`__ for more information.
.. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_lstm_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options)
Construct a :cpp:class:`ICU4XLineSegmenter` with custom options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
See the `Rust documentation for new_lstm_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm_with_options>`__ for more information.
.. cpp:function:: static diplomat::result<ICU4XLineSegmenter, ICU4XError> create_dictionary_with_options_v1(const ICU4XDataProvider& provider, ICU4XLineBreakOptionsV1 options)
Construct a :cpp:class:`ICU4XLineSegmenter` with custom options and dictionary payload data for Burmese, Khmer, Lao, and Thai.
See the `Rust documentation for new_dictionary_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary_with_options>`__ for more information.
.. cpp:function:: ICU4XLineBreakIteratorUtf8 segment_utf8(const std::string_view input) const
Segments a (potentially ill-formed) UTF-8 string.
See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf8>`__ for more information.
Lifetimes: ``this``, ``input`` must live at least as long as the output.
.. cpp:function:: ICU4XLineBreakIteratorUtf16 segment_utf16(const diplomat::span<const uint16_t> input) const
Segments a UTF-16 string.
See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf16>`__ for more information.
Lifetimes: ``this``, ``input`` must live at least as long as the output.
.. cpp:function:: ICU4XLineBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const
Segments a Latin-1 string.
See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_latin1>`__ for more information.
Lifetimes: ``this``, ``input`` must live at least as long as the output.
|