summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/cpp/docs/source/collator_ffi.rst
blob: ce3c24f07b0d0817b331e2515ef2a40aafff7be6 (plain)
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
``collator::ffi``
=================

.. cpp:class:: ICU4XCollator

    See the `Rust documentation for Collator <https://docs.rs/icu/latest/icu/collator/struct.Collator.html>`__ for more information.


    .. cpp:function:: static diplomat::result<ICU4XCollator, ICU4XError> create_v1(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XCollatorOptionsV1 options)

        Construct a new Collator instance.

        See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new>`__ for more information.


    .. cpp:function:: ICU4XOrdering compare(const std::string_view left, const std::string_view right) const

        Compare potentially ill-formed UTF-8 strings.

        Ill-formed input is compared as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.

        See the `Rust documentation for compare_utf8 <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf8>`__ for more information.


    .. cpp:function:: ICU4XOrdering compare_valid_utf8(const std::string_view left, const std::string_view right) const

        Compare guaranteed well-formed UTF-8 strings.

        Note: In C++, passing ill-formed UTF-8 strings is undefined behavior (and may be memory-unsafe to do so, too).

        See the `Rust documentation for compare <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare>`__ for more information.


    .. cpp:function:: ICU4XOrdering compare_utf16(const diplomat::span<const uint16_t> left, const diplomat::span<const uint16_t> right) const

        Compare potentially ill-formed UTF-16 strings, with unpaired surrogates compared as REPLACEMENT CHARACTER.

        See the `Rust documentation for compare_utf16 <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf16>`__ for more information.


.. cpp:enum-struct:: ICU4XCollatorAlternateHandling

    See the `Rust documentation for AlternateHandling <https://docs.rs/icu/latest/icu/collator/enum.AlternateHandling.html>`__ for more information.


    .. cpp:enumerator:: Auto

    .. cpp:enumerator:: NonIgnorable

    .. cpp:enumerator:: Shifted

.. cpp:enum-struct:: ICU4XCollatorBackwardSecondLevel

    See the `Rust documentation for BackwardSecondLevel <https://docs.rs/icu/latest/icu/collator/enum.BackwardSecondLevel.html>`__ for more information.


    .. cpp:enumerator:: Auto

    .. cpp:enumerator:: Off

    .. cpp:enumerator:: On

.. cpp:enum-struct:: ICU4XCollatorCaseFirst

    See the `Rust documentation for CaseFirst <https://docs.rs/icu/latest/icu/collator/enum.CaseFirst.html>`__ for more information.


    .. cpp:enumerator:: Auto

    .. cpp:enumerator:: Off

    .. cpp:enumerator:: LowerFirst

    .. cpp:enumerator:: UpperFirst

.. cpp:enum-struct:: ICU4XCollatorCaseLevel

    See the `Rust documentation for CaseLevel <https://docs.rs/icu/latest/icu/collator/enum.CaseLevel.html>`__ for more information.


    .. cpp:enumerator:: Auto

    .. cpp:enumerator:: Off

    .. cpp:enumerator:: On

.. cpp:enum-struct:: ICU4XCollatorMaxVariable

    See the `Rust documentation for MaxVariable <https://docs.rs/icu/latest/icu/collator/enum.MaxVariable.html>`__ for more information.


    .. cpp:enumerator:: Auto

    .. cpp:enumerator:: Space

    .. cpp:enumerator:: Punctuation

    .. cpp:enumerator:: Symbol

    .. cpp:enumerator:: Currency

.. cpp:enum-struct:: ICU4XCollatorNumeric

    See the `Rust documentation for Numeric <https://docs.rs/icu/latest/icu/collator/enum.Numeric.html>`__ for more information.


    .. cpp:enumerator:: Auto

    .. cpp:enumerator:: Off

    .. cpp:enumerator:: On

.. cpp:struct:: ICU4XCollatorOptionsV1

    See the `Rust documentation for CollatorOptions <https://docs.rs/icu/latest/icu/collator/struct.CollatorOptions.html>`__ for more information.


    .. cpp:member:: ICU4XCollatorStrength strength

    .. cpp:member:: ICU4XCollatorAlternateHandling alternate_handling

    .. cpp:member:: ICU4XCollatorCaseFirst case_first

    .. cpp:member:: ICU4XCollatorMaxVariable max_variable

    .. cpp:member:: ICU4XCollatorCaseLevel case_level

    .. cpp:member:: ICU4XCollatorNumeric numeric

    .. cpp:member:: ICU4XCollatorBackwardSecondLevel backward_second_level

.. cpp:enum-struct:: ICU4XCollatorStrength

    See the `Rust documentation for Strength <https://docs.rs/icu/latest/icu/collator/enum.Strength.html>`__ for more information.


    .. cpp:enumerator:: Auto

    .. cpp:enumerator:: Primary

    .. cpp:enumerator:: Secondary

    .. cpp:enumerator:: Tertiary

    .. cpp:enumerator:: Quaternary

    .. cpp:enumerator:: Identical