summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/package/docs/source/list_ffi.rst
blob: 2d78d7ad529226ad33dbbf5ccd0361e52ea7003b (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
``list::ffi``
=============

.. js:class:: ICU4XList

    A list of strings


    .. js:function:: create()

        Create a new list of strings


    .. js:function:: create_with_capacity(capacity)

        Create a new list of strings with preallocated space to hold at least ``capacity`` elements


    .. js:method:: push(val)

        Push a string to the list

        For C++ users, potentially invalid UTF8 will be handled via REPLACEMENT CHARACTERs


    .. js:method:: len()

        The number of elements in this list


.. js:class:: ICU4XListFormatter

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


    .. js:function:: create_and_with_length(provider, locale, length)

        Construct a new ICU4XListFormatter instance for And patterns

        See the `Rust documentation for try_new_and_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and_with_length>`__ for more information.


    .. js:function:: create_or_with_length(provider, locale, length)

        Construct a new ICU4XListFormatter instance for And patterns

        See the `Rust documentation for try_new_or_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or_with_length>`__ for more information.


    .. js:function:: create_unit_with_length(provider, locale, length)

        Construct a new ICU4XListFormatter instance for And patterns

        See the `Rust documentation for try_new_unit_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit_with_length>`__ for more information.


    .. js:method:: format(list)

        See the `Rust documentation for format <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format>`__ for more information.


.. js:class:: ICU4XListLength

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