cstl_sys/
lib.rs

1/* automatically generated by rust-bindgen 0.71.1 */
2
3#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5#![allow(non_upper_case_globals)]
6
7pub type wchar_t = ::std::os::raw::c_ushort;
8#[doc = " Opaque memory allocator interface.\n\n The caller is responsible for making sure an allocator owns and is compatible\n for freeing memory of a given container.\n\n `aligned_alloc` and `aligned_free` must not be null, while `allocator` can\n be used to pass any opaque data (if any) directly to the bound functions.\n\n A strict alignment requirement may be imposed by allocated types.\n"]
9#[repr(C)]
10#[derive(Debug, Copy, Clone)]
11pub struct CSTL_Alloc {
12    #[doc = " Pointer to opaque data, passed to bound memory allocation functions.\n"]
13    pub opaque: *mut ::std::os::raw::c_void,
14    #[doc = " Must return a memory block of at least `size` bytes that is at least\n as aligned as `alignment`\n"]
15    pub aligned_alloc: ::std::option::Option<
16        unsafe extern "C" fn(
17            opaque: *mut ::std::os::raw::c_void,
18            size: usize,
19            alignment: usize,
20        ) -> *mut ::std::os::raw::c_void,
21    >,
22    #[doc = " Must be able to free previously allocated memory.\n\n The caller is responsible for allocator compatibility.\n"]
23    pub aligned_free: ::std::option::Option<
24        unsafe extern "C" fn(
25            opaque: *mut ::std::os::raw::c_void,
26            memory: *mut ::std::os::raw::c_void,
27            size: usize,
28            alignment: usize,
29        ),
30    >,
31}
32#[allow(clippy::unnecessary_operation, clippy::identity_op)]
33const _: () = {
34    ["Size of CSTL_Alloc"][::std::mem::size_of::<CSTL_Alloc>() - 24usize];
35    ["Alignment of CSTL_Alloc"][::std::mem::align_of::<CSTL_Alloc>() - 8usize];
36    ["Offset of field: CSTL_Alloc::opaque"][::std::mem::offset_of!(CSTL_Alloc, opaque) - 0usize];
37    ["Offset of field: CSTL_Alloc::aligned_alloc"]
38        [::std::mem::offset_of!(CSTL_Alloc, aligned_alloc) - 8usize];
39    ["Offset of field: CSTL_Alloc::aligned_free"]
40        [::std::mem::offset_of!(CSTL_Alloc, aligned_free) - 16usize];
41};
42#[repr(C)]
43#[derive(Debug, Copy, Clone)]
44pub struct CSTL_SType {
45    _unused: [u8; 0],
46}
47#[doc = " Opaque pseudohandle to the size and alignment of a C type.\n\n Defined with `CSTL_define_type`, it is valid if not equal to `NULL`.\n\n The size of the type must be less than or equal to `INTPTR_MAX`.\n"]
48pub type CSTL_Type = *mut CSTL_SType;
49#[doc = " Destroy range.\n\n Required to destroy objects in the range `[first, last)`.\n\n After this call, all objects in the range `[first, last)` are\n treated as uninitialized memory.\n"]
50pub type CSTL_Drop = ::std::option::Option<
51    unsafe extern "C" fn(first: *mut ::std::os::raw::c_void, last: *mut ::std::os::raw::c_void),
52>;
53#[doc = " Move range.\n\n Required to write `last - first` objects to uninitialized memory at\n `dest` so that each of them is equal to the corresponding object in\n the range `[first, last)` before the operation.\n\n After this call, all objects in the range `[first, last)` are\n treated as valid objects in an unspecified state.\n"]
54pub type CSTL_Move = ::std::option::Option<
55    unsafe extern "C" fn(
56        first: *mut ::std::os::raw::c_void,
57        last: *mut ::std::os::raw::c_void,
58        dest: *mut ::std::os::raw::c_void,
59    ),
60>;
61#[doc = " Copy range.\n\n Required to write `(last - first) / size` objects to uninitialized\n memory at `dest` so that each of them is equal to the corresponding\n object in the range `[first, last)`.\n\n Note that a `CSTL_Copy` function satisfies the requirements of\n `CSTL_Move`.\n"]
62pub type CSTL_Copy = ::std::option::Option<
63    unsafe extern "C" fn(
64        first: *const ::std::os::raw::c_void,
65        last: *const ::std::os::raw::c_void,
66        dest: *mut ::std::os::raw::c_void,
67    ),
68>;
69#[doc = " Fill range.\n\n Required to write `(last - first) / size` copies of `instance`\n to uninitialized memory at `[first, last)` so that each of them\n is equal to the corresponding `instance`.\n"]
70pub type CSTL_Fill = ::std::option::Option<
71    unsafe extern "C" fn(
72        first: *mut ::std::os::raw::c_void,
73        last: *mut ::std::os::raw::c_void,
74        value: *const ::std::os::raw::c_void,
75    ),
76>;
77#[doc = " Function table for a type that can be destroyed by calling `drop`\n on a range of objects of that type.\n"]
78#[repr(C)]
79#[derive(Debug, Copy, Clone)]
80pub struct CSTL_DropType {
81    pub drop: CSTL_Drop,
82}
83#[allow(clippy::unnecessary_operation, clippy::identity_op)]
84const _: () = {
85    ["Size of CSTL_DropType"][::std::mem::size_of::<CSTL_DropType>() - 8usize];
86    ["Alignment of CSTL_DropType"][::std::mem::align_of::<CSTL_DropType>() - 8usize];
87    ["Offset of field: CSTL_DropType::drop"][::std::mem::offset_of!(CSTL_DropType, drop) - 0usize];
88};
89#[doc = " Function table for a type that can be moved by calling `move`\n on a range of objects of that type to another range, or destroyed.\n"]
90#[repr(C)]
91#[derive(Debug, Copy, Clone)]
92pub struct CSTL_MoveType {
93    pub drop_type: CSTL_DropType,
94    pub move_: CSTL_Move,
95}
96#[allow(clippy::unnecessary_operation, clippy::identity_op)]
97const _: () = {
98    ["Size of CSTL_MoveType"][::std::mem::size_of::<CSTL_MoveType>() - 16usize];
99    ["Alignment of CSTL_MoveType"][::std::mem::align_of::<CSTL_MoveType>() - 8usize];
100    ["Offset of field: CSTL_MoveType::drop_type"]
101        [::std::mem::offset_of!(CSTL_MoveType, drop_type) - 0usize];
102    ["Offset of field: CSTL_MoveType::move_"]
103        [::std::mem::offset_of!(CSTL_MoveType, move_) - 8usize];
104};
105#[doc = " Function table for a type that can be copied by calling `copy`\n on a range of objects of that type to another range, or moved, or destroyed.\n\n It is valid for `copy` to bind the same function as `move_type.move`.\n"]
106#[repr(C)]
107#[derive(Debug, Copy, Clone)]
108pub struct CSTL_CopyType {
109    pub move_type: CSTL_MoveType,
110    pub copy: CSTL_Copy,
111    pub fill: CSTL_Fill,
112}
113#[allow(clippy::unnecessary_operation, clippy::identity_op)]
114const _: () = {
115    ["Size of CSTL_CopyType"][::std::mem::size_of::<CSTL_CopyType>() - 32usize];
116    ["Alignment of CSTL_CopyType"][::std::mem::align_of::<CSTL_CopyType>() - 8usize];
117    ["Offset of field: CSTL_CopyType::move_type"]
118        [::std::mem::offset_of!(CSTL_CopyType, move_type) - 0usize];
119    ["Offset of field: CSTL_CopyType::copy"][::std::mem::offset_of!(CSTL_CopyType, copy) - 16usize];
120    ["Offset of field: CSTL_CopyType::fill"][::std::mem::offset_of!(CSTL_CopyType, fill) - 24usize];
121};
122#[doc = " Reference to a const `CSTL_DropType`.\n\n Must not be null.\n"]
123pub type CSTL_DropTypeCRef = *const CSTL_DropType;
124#[doc = " Reference to a const `CSTL_MoveType`.\n\n Must not be null.\n"]
125pub type CSTL_MoveTypeCRef = *const CSTL_MoveType;
126#[doc = " Reference to a const `CSTL_CopyType`.\n\n Must not be null.\n"]
127pub type CSTL_CopyTypeCRef = *const CSTL_CopyType;
128#[doc = " Compare two objects for equality.\n\n The function must establish an equivalence relation:\n `a == b` => `b == a`, `a == b` && `b == c` => `a == c`\n"]
129pub type CSTL_IsEq = ::std::option::Option<
130    unsafe extern "C" fn(
131        lhs: *const ::std::os::raw::c_void,
132        rhs: *const ::std::os::raw::c_void,
133    ) -> bool,
134>;
135#[doc = " Compare two objects for less than.\n\n The function must establish at least a strict weak ordering:\n `a < b` => `b < a == false`\n `a < b` && `b < c` => `a < c`\n"]
136pub type CSTL_IsLt = ::std::option::Option<
137    unsafe extern "C" fn(
138        lhs: *const ::std::os::raw::c_void,
139        rhs: *const ::std::os::raw::c_void,
140    ) -> bool,
141>;
142#[doc = " Function table for a type instances of which can be ordered\n with respect to others in a string weak ordering.\n"]
143#[repr(C)]
144#[derive(Debug, Copy, Clone)]
145pub struct CSTL_CompType {
146    pub is_eq: CSTL_IsEq,
147    pub is_lt: CSTL_IsLt,
148}
149#[allow(clippy::unnecessary_operation, clippy::identity_op)]
150const _: () = {
151    ["Size of CSTL_CompType"][::std::mem::size_of::<CSTL_CompType>() - 16usize];
152    ["Alignment of CSTL_CompType"][::std::mem::align_of::<CSTL_CompType>() - 8usize];
153    ["Offset of field: CSTL_CompType::is_eq"]
154        [::std::mem::offset_of!(CSTL_CompType, is_eq) - 0usize];
155    ["Offset of field: CSTL_CompType::is_lt"]
156        [::std::mem::offset_of!(CSTL_CompType, is_lt) - 8usize];
157};
158#[doc = " Obtain a hash for an instance of an object.\n\n The relation `a == b` => `hash(a) == hash(b)` must hold.\n"]
159pub type CSTL_Hash =
160    ::std::option::Option<unsafe extern "C" fn(instance: *const ::std::os::raw::c_void) -> usize>;
161#[doc = " Function table for a type instances of which can be hashed\n and compared for equality.\n"]
162#[repr(C)]
163#[derive(Debug, Copy, Clone)]
164pub struct CSTL_HashType {
165    pub is_eq: CSTL_IsEq,
166    pub hash: CSTL_Hash,
167}
168#[allow(clippy::unnecessary_operation, clippy::identity_op)]
169const _: () = {
170    ["Size of CSTL_HashType"][::std::mem::size_of::<CSTL_HashType>() - 16usize];
171    ["Alignment of CSTL_HashType"][::std::mem::align_of::<CSTL_HashType>() - 8usize];
172    ["Offset of field: CSTL_HashType::is_eq"]
173        [::std::mem::offset_of!(CSTL_HashType, is_eq) - 0usize];
174    ["Offset of field: CSTL_HashType::hash"][::std::mem::offset_of!(CSTL_HashType, hash) - 8usize];
175};
176unsafe extern "C" {
177    #[doc = " Obtain a pseudohandle to the size and alignment of a C type.\n\n If the below requirements are broken, the function returns\n an invalid handle equal to `NULL`:\n 1. `size` must be a non-zero multiple of `alignment`.\n 2. `alignment` must be a power of 2.\n 3. `size` must be less than or equal to `INTPTR_MAX`.\n"]
178    pub fn CSTL_define_type(size: usize, alignment: usize) -> CSTL_Type;
179}
180unsafe extern "C" {
181    #[doc = " Get the size of a C type back from a packed pseudohandle representation.\n"]
182    pub fn CSTL_sizeof_type(type_: CSTL_Type) -> usize;
183}
184unsafe extern "C" {
185    #[doc = " Get the alignment of a C type back from a packed pseudohandle representation.\n"]
186    pub fn CSTL_alignof_type(type_: CSTL_Type) -> usize;
187}
188#[doc = " STL ABI `std::vector` layout.\n\n Does not include the allocator, which nonetheless is a part of the `std::vector`\n structure! You are responsible for including it, since it can take on any form.\n\n Do not manipulate the members directly, use the associated functions!\n"]
189#[repr(C)]
190pub struct CSTL_VectorVal {
191    pub first: *mut ::std::os::raw::c_void,
192    pub last: *mut ::std::os::raw::c_void,
193    pub end: *mut ::std::os::raw::c_void,
194}
195#[allow(clippy::unnecessary_operation, clippy::identity_op)]
196const _: () = {
197    ["Size of CSTL_VectorVal"][::std::mem::size_of::<CSTL_VectorVal>() - 24usize];
198    ["Alignment of CSTL_VectorVal"][::std::mem::align_of::<CSTL_VectorVal>() - 8usize];
199    ["Offset of field: CSTL_VectorVal::first"]
200        [::std::mem::offset_of!(CSTL_VectorVal, first) - 0usize];
201    ["Offset of field: CSTL_VectorVal::last"]
202        [::std::mem::offset_of!(CSTL_VectorVal, last) - 8usize];
203    ["Offset of field: CSTL_VectorVal::end"][::std::mem::offset_of!(CSTL_VectorVal, end) - 16usize];
204};
205#[doc = " Reference to a mutable `CSTL_VectorVal`.\n\n Must not be null.\n"]
206pub type CSTL_VectorRef = *mut CSTL_VectorVal;
207#[doc = " Reference to a const `CSTL_VectorVal`.\n\n Must not be null.\n"]
208pub type CSTL_VectorCRef = *const CSTL_VectorVal;
209#[doc = " An iterator over elements of a vector.\n\n Contains a reference to a `CSTL_Type` which must outlive it.\n\n Not ABI-compatible with `std::vector::iterator`.\n"]
210#[repr(C)]
211#[derive(Debug, Copy, Clone)]
212pub struct CSTL_VectorIter {
213    pub pointer: *const ::std::os::raw::c_void,
214    pub size: usize,
215    pub owner: CSTL_VectorCRef,
216}
217#[allow(clippy::unnecessary_operation, clippy::identity_op)]
218const _: () = {
219    ["Size of CSTL_VectorIter"][::std::mem::size_of::<CSTL_VectorIter>() - 24usize];
220    ["Alignment of CSTL_VectorIter"][::std::mem::align_of::<CSTL_VectorIter>() - 8usize];
221    ["Offset of field: CSTL_VectorIter::pointer"]
222        [::std::mem::offset_of!(CSTL_VectorIter, pointer) - 0usize];
223    ["Offset of field: CSTL_VectorIter::size"]
224        [::std::mem::offset_of!(CSTL_VectorIter, size) - 8usize];
225    ["Offset of field: CSTL_VectorIter::owner"]
226        [::std::mem::offset_of!(CSTL_VectorIter, owner) - 16usize];
227};
228unsafe extern "C" {
229    #[doc = " Initializes the vector pointed to by `new_instance`, but does not allocate any memory.\n\n An initialized vector can be trivially destroyed without leaks as long\n as no functions that allocate (push, insert, reserve, etc.) have been called on it.\n\n Re-initializing a vector with a backing memory allocation will leak the old\n memory allocation.\n"]
230    pub fn CSTL_vector_construct(new_instance: *mut CSTL_VectorVal);
231}
232unsafe extern "C" {
233    #[doc = " Destroys the vector pointed to by `instance`, destroying elements\n and freeing the backing storage.\n"]
234    pub fn CSTL_vector_destroy(
235        instance: CSTL_VectorRef,
236        type_: CSTL_Type,
237        drop: CSTL_DropTypeCRef,
238        alloc: *mut CSTL_Alloc,
239    );
240}
241unsafe extern "C" {
242    #[doc = " Replaces the contents of `instance` with the contents of `other_instance`.\n\n If `propagate_alloc == true && alloc != other_alloc` then storage\n is freed with `alloc` and allocated again with `other_alloc` before elements\n are copied. Then, `instance` uses `other_alloc` as its allocator. If\n the allocation fails, returns `false`, otherwise always returns `true`.\n\n If `propagate_alloc == false` `instance` keeps using `alloc` as its allocator,\n potentially reusing its storage.\n\n You are responsible for replacing the allocator outside of `CSTL_VectorVal` if applicable.\n"]
243    pub fn CSTL_vector_copy_assign(
244        instance: CSTL_VectorRef,
245        type_: CSTL_Type,
246        copy: CSTL_CopyTypeCRef,
247        other_instance: CSTL_VectorCRef,
248        alloc: *mut CSTL_Alloc,
249        other_alloc: *mut CSTL_Alloc,
250        propagate_alloc: bool,
251    ) -> bool;
252}
253unsafe extern "C" {
254    #[doc = " Moves the contents of `other_instance` to the contents of `instance`.\n\n If `propagate_alloc == true` storage is replaced with storage of `other_instance`.\n Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false && alloc != other_alloc` then storage is reused\n and individual elements of `other_instance` are moved in. If the allocation fails,\n returns `false`, otherwise always returns `true`. Then, `instance` uses\n `alloc` as its allocator.\n\n You are responsible for replacing the allocator outside of `CSTL_VectorVal` if applicable.\n"]
255    pub fn CSTL_vector_move_assign(
256        instance: CSTL_VectorRef,
257        type_: CSTL_Type,
258        move_: CSTL_MoveTypeCRef,
259        other_instance: CSTL_VectorRef,
260        alloc: *mut CSTL_Alloc,
261        other_alloc: *mut CSTL_Alloc,
262        propagate_alloc: bool,
263    ) -> bool;
264}
265unsafe extern "C" {
266    #[doc = " Destroys vector contents, replacing them with a copy of the range `[first, last)`.\n\n If `new_size > CSTL_vector_max_size(type)` (vector too long)\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
267    pub fn CSTL_vector_copy_assign_range(
268        instance: CSTL_VectorRef,
269        type_: CSTL_Type,
270        copy: CSTL_CopyTypeCRef,
271        first: *const ::std::os::raw::c_void,
272        last: *const ::std::os::raw::c_void,
273        alloc: *mut CSTL_Alloc,
274    ) -> bool;
275}
276unsafe extern "C" {
277    #[doc = " Destroys vector contents, replacing them with a copy of the range `[first, last)`.\n\n If `new_size > CSTL_vector_max_size(type)` (vector too long)\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
278    pub fn CSTL_vector_move_assign_range(
279        instance: CSTL_VectorRef,
280        type_: CSTL_Type,
281        move_: CSTL_MoveTypeCRef,
282        first: *mut ::std::os::raw::c_void,
283        last: *mut ::std::os::raw::c_void,
284        alloc: *mut CSTL_Alloc,
285    ) -> bool;
286}
287unsafe extern "C" {
288    #[doc = " Destroys vector contents, replacing them with `new_size` copies of `value`.\n\n If `new_size > CSTL_vector_max_size(type)` (vector too long)\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
289    pub fn CSTL_vector_assign_n(
290        instance: CSTL_VectorRef,
291        type_: CSTL_Type,
292        copy: CSTL_CopyTypeCRef,
293        new_size: usize,
294        value: *const ::std::os::raw::c_void,
295        alloc: *mut CSTL_Alloc,
296    ) -> bool;
297}
298unsafe extern "C" {
299    #[doc = " Swaps vector contents.\n\n You are responsible for swapping the allocators.\n"]
300    pub fn CSTL_vector_swap(instance: CSTL_VectorRef, other_instance: CSTL_VectorRef);
301}
302unsafe extern "C" {
303    #[doc = " Returns a pointer to the element at `pos`.\n\n If `pos >= CSTL_vector_size(instance, type)` the behavior is undefined.\n"]
304    pub fn CSTL_vector_index(
305        instance: CSTL_VectorRef,
306        type_: CSTL_Type,
307        pos: usize,
308    ) -> *mut ::std::os::raw::c_void;
309}
310unsafe extern "C" {
311    #[doc = " Returns a const pointer to the element at `pos`.\n\n If `pos >= CSTL_vector_size(instance, type)` the behavior is undefined.\n"]
312    pub fn CSTL_vector_const_index(
313        instance: CSTL_VectorCRef,
314        type_: CSTL_Type,
315        pos: usize,
316    ) -> *const ::std::os::raw::c_void;
317}
318unsafe extern "C" {
319    #[doc = " Returns a pointer to the element at `pos`.\n\n If `pos >= CSTL_vector_size(instance, type)` a null pointer is returned.\n"]
320    pub fn CSTL_vector_at(
321        instance: CSTL_VectorRef,
322        type_: CSTL_Type,
323        pos: usize,
324    ) -> *mut ::std::os::raw::c_void;
325}
326unsafe extern "C" {
327    #[doc = " Returns a const pointer to the element at `pos`.\n\n If `pos >= CSTL_vector_size(instance, type)` a null pointer is returned.\n"]
328    pub fn CSTL_vector_const_at(
329        instance: CSTL_VectorCRef,
330        type_: CSTL_Type,
331        pos: usize,
332    ) -> *const ::std::os::raw::c_void;
333}
334unsafe extern "C" {
335    #[doc = " Returns a pointer to the first element in the vector.\n\n If `CSTL_vector_empty(instance) == true` the behavior is undefined.\n"]
336    pub fn CSTL_vector_front(instance: CSTL_VectorRef) -> *mut ::std::os::raw::c_void;
337}
338unsafe extern "C" {
339    #[doc = " Returns a const pointer to the first element in the vector.\n\n If `CSTL_vector_empty(instance) == true` the behavior is undefined.\n"]
340    pub fn CSTL_vector_const_front(instance: CSTL_VectorCRef) -> *const ::std::os::raw::c_void;
341}
342unsafe extern "C" {
343    #[doc = " Returns a pointer to the last element in the vector.\n\n If `CSTL_vector_empty(instance) == true` the behavior is undefined.\n"]
344    pub fn CSTL_vector_back(
345        instance: CSTL_VectorRef,
346        type_: CSTL_Type,
347    ) -> *mut ::std::os::raw::c_void;
348}
349unsafe extern "C" {
350    #[doc = " Returns a const pointer to the last element in the vector.\n\n If `CSTL_vector_empty(instance) == true` the behavior is undefined.\n"]
351    pub fn CSTL_vector_const_back(
352        instance: CSTL_VectorCRef,
353        type_: CSTL_Type,
354    ) -> *const ::std::os::raw::c_void;
355}
356unsafe extern "C" {
357    #[doc = " Returns a pointer to the underlying storage.\n\n The returned pointer is valid even if the vector is empty,\n in which case it is not dereferenceable.\n"]
358    pub fn CSTL_vector_data(instance: CSTL_VectorRef) -> *mut ::std::os::raw::c_void;
359}
360unsafe extern "C" {
361    #[doc = " Returns a pointer to the underlying storage.\n\n The returned pointer is valid even if the vector is empty,\n in which case it is not dereferenceable.\n"]
362    pub fn CSTL_vector_const_data(instance: CSTL_VectorCRef) -> *const ::std::os::raw::c_void;
363}
364unsafe extern "C" {
365    #[doc = " Construct an iterator to the first element of the vector.\n\n If the vector is empty: `CSTL_vector_iterator_eq(begin, end) == true`.\n"]
366    pub fn CSTL_vector_begin(instance: CSTL_VectorCRef, type_: CSTL_Type) -> CSTL_VectorIter;
367}
368unsafe extern "C" {
369    #[doc = " Construct an iterator past the last element of the vector.\n\n If the vector is empty: `CSTL_vector_iterator_eq(begin, end) == true`.\n"]
370    pub fn CSTL_vector_end(instance: CSTL_VectorCRef, type_: CSTL_Type) -> CSTL_VectorIter;
371}
372unsafe extern "C" {
373    #[doc = " Seeks the iterator forwards by `n` elements.\n\n Returns a new iterator at the resulting iterator position.\n"]
374    pub fn CSTL_vector_iterator_add(iterator: CSTL_VectorIter, n: isize) -> CSTL_VectorIter;
375}
376unsafe extern "C" {
377    #[doc = " Seeks the iterator backwards by `n` elements.\n\n Returns a new iterator at the resulting iterator position.\n"]
378    pub fn CSTL_vector_iterator_sub(iterator: CSTL_VectorIter, n: isize) -> CSTL_VectorIter;
379}
380unsafe extern "C" {
381    #[doc = " Dereferences the iterator at the element it's pointing to.\n\n Returns a pointer to the element.\n\n `iterator` must be dereferenceable, not value initialized\n and pointing to a valid element inside the vector.\n\n It is not valid to mutate an element derived from an iterator obtained with\n a const vector pointer.\n"]
382    pub fn CSTL_vector_iterator_deref(iterator: CSTL_VectorIter) -> *mut ::std::os::raw::c_void;
383}
384unsafe extern "C" {
385    #[doc = " Dereferences the iterator at an element offset `n`.\n\n Returns a pointer to the element.\n\n `iterator` must be dereferenceable at its new position, not value initialized\n and pointing to a valid element inside the vector.\n\n It is not valid to mutate an element derived from an iterator obtained with\n a const vector pointer.\n"]
386    pub fn CSTL_vector_iterator_index(
387        iterator: CSTL_VectorIter,
388        n: isize,
389    ) -> *mut ::std::os::raw::c_void;
390}
391unsafe extern "C" {
392    #[doc = " Subtracts two iterators and returns the distance measured in elements.\n\n Returns the signed number of elements between two iterators.\n\n They must belong to the same vector.\n"]
393    pub fn CSTL_vector_iterator_distance(lhs: CSTL_VectorIter, rhs: CSTL_VectorIter) -> isize;
394}
395unsafe extern "C" {
396    #[doc = " Compares iterators for equality.\n\n They must belong to the same vector.\n"]
397    pub fn CSTL_vector_iterator_eq(lhs: CSTL_VectorIter, rhs: CSTL_VectorIter) -> bool;
398}
399unsafe extern "C" {
400    #[doc = " Compares iterators for less than.\n\n They must belong to the same vector.\n"]
401    pub fn CSTL_vector_iterator_lt(lhs: CSTL_VectorIter, rhs: CSTL_VectorIter) -> bool;
402}
403unsafe extern "C" {
404    #[doc = " Returns `true` if the vector is empty or `false` otherwise.\n"]
405    pub fn CSTL_vector_empty(instance: CSTL_VectorCRef) -> bool;
406}
407unsafe extern "C" {
408    #[doc = " Returns the number of elements in the vector.\n"]
409    pub fn CSTL_vector_size(instance: CSTL_VectorCRef, type_: CSTL_Type) -> usize;
410}
411unsafe extern "C" {
412    #[doc = " Returns the total element capacity of the vector.\n"]
413    pub fn CSTL_vector_capacity(instance: CSTL_VectorCRef, type_: CSTL_Type) -> usize;
414}
415unsafe extern "C" {
416    #[doc = " Returns the maximum possible number of elements in the vector.\n\n As if by `(PTRDIFF_MAX - 1) / CSTL_type_size(type)`.\n"]
417    pub fn CSTL_vector_max_size(type_: CSTL_Type) -> usize;
418}
419unsafe extern "C" {
420    #[doc = " Resizes the vector to contain `new_size` elements.\n\n If `new_size > CSTL_vector_max_size(type)` (vector too long)\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
421    pub fn CSTL_vector_resize(
422        instance: CSTL_VectorRef,
423        type_: CSTL_Type,
424        copy: CSTL_CopyTypeCRef,
425        new_size: usize,
426        value: *const ::std::os::raw::c_void,
427        alloc: *mut CSTL_Alloc,
428    ) -> bool;
429}
430unsafe extern "C" {
431    #[doc = " Truncates the vector to contain `new_size` elements, removing any excess.\n\n Has no effect if `new_size >= CSTL_vector_size(instance, type)`.\n\n If `new_size > CSTL_vector_max_size(type)` (vector too long)\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
432    pub fn CSTL_vector_truncate(
433        instance: CSTL_VectorRef,
434        type_: CSTL_Type,
435        drop: CSTL_DropTypeCRef,
436        new_size: usize,
437    );
438}
439unsafe extern "C" {
440    #[doc = " If `new_capacity > CSTL_vector_capacity(instance, type)`, reallocates and expands\n the vector storage.\n\n If `new_capacity` exceeds `CSTL_vector_max_size(type)` (vector too long)\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
441    pub fn CSTL_vector_reserve(
442        instance: CSTL_VectorRef,
443        type_: CSTL_Type,
444        move_: CSTL_MoveTypeCRef,
445        new_capacity: usize,
446        alloc: *mut CSTL_Alloc,
447    ) -> bool;
448}
449unsafe extern "C" {
450    #[doc = " Request removal of unused capacity.\n\n If a reallocation occurs and fails returns `false`, otherwise\n always returns `true`.\n"]
451    pub fn CSTL_vector_shrink_to_fit(
452        instance: CSTL_VectorRef,
453        type_: CSTL_Type,
454        move_: CSTL_MoveTypeCRef,
455        alloc: *mut CSTL_Alloc,
456    ) -> bool;
457}
458unsafe extern "C" {
459    #[doc = " Erase all elements from the vector without affecting capacity.\n"]
460    pub fn CSTL_vector_clear(instance: CSTL_VectorRef, drop: CSTL_DropTypeCRef);
461}
462unsafe extern "C" {
463    #[doc = " Appends a copy of `value` to the end of the vector.\n\n If `CSTL_vector_size(instance, type) == CSTL_vector_max_size(type)` (vector too long)\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
464    pub fn CSTL_vector_copy_push_back(
465        instance: CSTL_VectorRef,
466        type_: CSTL_Type,
467        copy: CSTL_CopyTypeCRef,
468        value: *const ::std::os::raw::c_void,
469        alloc: *mut CSTL_Alloc,
470    ) -> bool;
471}
472unsafe extern "C" {
473    #[doc = " Appends `value` to the end of the vector by moving it.\n\n If `CSTL_vector_size(instance, type) == CSTL_vector_max_size(type)` (vector too long)\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
474    pub fn CSTL_vector_move_push_back(
475        instance: CSTL_VectorRef,
476        type_: CSTL_Type,
477        move_: CSTL_MoveTypeCRef,
478        value: *mut ::std::os::raw::c_void,
479        alloc: *mut CSTL_Alloc,
480    ) -> bool;
481}
482unsafe extern "C" {
483    #[doc = " Removes the last element from the vector.\n\n If `CSTL_vector_empty(instance) == true` the behavior is undefined.\n"]
484    pub fn CSTL_vector_pop_back(
485        instance: CSTL_VectorRef,
486        type_: CSTL_Type,
487        drop: CSTL_DropTypeCRef,
488    );
489}
490unsafe extern "C" {
491    #[doc = " Inserts a copy of `value` into the vector before `where` and returns\n an iterator to the newly inserted element.\n\n If `CSTL_vector_size(instance, ...) == CSTL_vector_max_size(...)` (vector too long)\n this function has no effect and returns `CSTL_vector_end(instance, ...)`.\n"]
492    pub fn CSTL_vector_copy_insert(
493        instance: CSTL_VectorRef,
494        copy: CSTL_CopyTypeCRef,
495        where_: CSTL_VectorIter,
496        value: *const ::std::os::raw::c_void,
497        alloc: *mut CSTL_Alloc,
498    ) -> CSTL_VectorIter;
499}
500unsafe extern "C" {
501    #[doc = " Inserts `value` into the vector before `where` by moving it and returns\n an iterator to the newly inserted element.\n\n If `CSTL_vector_size(instance, ...) == CSTL_vector_max_size(...)` (vector too long)\n this function has no effect and returns `CSTL_vector_end(instance, ...)`.\n"]
502    pub fn CSTL_vector_move_insert(
503        instance: CSTL_VectorRef,
504        move_: CSTL_MoveTypeCRef,
505        where_: CSTL_VectorIter,
506        value: *mut ::std::os::raw::c_void,
507        alloc: *mut CSTL_Alloc,
508    ) -> CSTL_VectorIter;
509}
510unsafe extern "C" {
511    #[doc = " Inserts a copy of the range `[range_first, range_last)` into the vector before `where` and returns\n an iterator to the newly inserted elements.\n\n Exceeding the maximum possible vector size has the same effect as `CSTL_vector_copy_insert`,\n returning `CSTL_vector_end(instance, ...)`.\n"]
512    pub fn CSTL_vector_copy_insert_range(
513        instance: CSTL_VectorRef,
514        copy: CSTL_CopyTypeCRef,
515        where_: CSTL_VectorIter,
516        range_first: *const ::std::os::raw::c_void,
517        range_last: *const ::std::os::raw::c_void,
518        alloc: *mut CSTL_Alloc,
519    ) -> CSTL_VectorIter;
520}
521unsafe extern "C" {
522    #[doc = " Inserts the range `[range_first, range_last)` into the vector before `where` by moving it and returns\n an iterator to the newly inserted elements.\n\n Exceeding the maximum possible vector size has the same effect as `CSTL_vector_move_insert`,\n returning `CSTL_vector_end(instance, ...)`.\n"]
523    pub fn CSTL_vector_move_insert_range(
524        instance: CSTL_VectorRef,
525        move_: CSTL_MoveTypeCRef,
526        where_: CSTL_VectorIter,
527        range_first: *mut ::std::os::raw::c_void,
528        range_last: *mut ::std::os::raw::c_void,
529        alloc: *mut CSTL_Alloc,
530    ) -> CSTL_VectorIter;
531}
532unsafe extern "C" {
533    #[doc = " Inserts `count` copies of `value` into the vector before `where` and returns\n an iterator to the first newly inserted element.\n\n If `count > CSTL_vector_max_size(...) - CSTL_vector_size(instance, ...)` (vector too long)\n this function has no effect and returns `CSTL_vector_end(instance, ...)`.\n"]
534    pub fn CSTL_vector_insert_n(
535        instance: CSTL_VectorRef,
536        copy: CSTL_CopyTypeCRef,
537        where_: CSTL_VectorIter,
538        count: usize,
539        value: *const ::std::os::raw::c_void,
540        alloc: *mut CSTL_Alloc,
541    ) -> CSTL_VectorIter;
542}
543unsafe extern "C" {
544    #[doc = " Removes the element at `where` and returns an iterator following the\n removed element.\n\n The iterator `where` must be valid and dereferenceable.\n"]
545    pub fn CSTL_vector_erase(
546        instance: CSTL_VectorRef,
547        move_: CSTL_MoveTypeCRef,
548        where_: CSTL_VectorIter,
549    ) -> CSTL_VectorIter;
550}
551unsafe extern "C" {
552    #[doc = " Removes elements in the range `[first, last)` and returns an iterator following the\n removed elements.\n\n If `first == last`, no operation is performed.\n"]
553    pub fn CSTL_vector_erase_range(
554        instance: CSTL_VectorRef,
555        move_: CSTL_MoveTypeCRef,
556        first: CSTL_VectorIter,
557        last: CSTL_VectorIter,
558    ) -> CSTL_VectorIter;
559}
560#[doc = " STL ABI `std::basic_string` layout.\n\n Does not include the allocator, which nonetheless is a part of the `std::basic_string`\n structure! You are responsible for including it, since it can take on any form.\n\n Do not manipulate the members directly, use the associated functions!\n"]
561#[repr(C)]
562pub struct CSTL_StringVal {
563    pub bx: CSTL_StringVal__bindgen_ty_1,
564    pub size: usize,
565    pub res: usize,
566}
567#[repr(C)]
568#[derive(Copy, Clone)]
569pub union CSTL_StringVal__bindgen_ty_1 {
570    pub buf: [::std::os::raw::c_char; 16usize],
571    pub ptr: *mut ::std::os::raw::c_char,
572}
573#[allow(clippy::unnecessary_operation, clippy::identity_op)]
574const _: () = {
575    ["Size of CSTL_StringVal__bindgen_ty_1"]
576        [::std::mem::size_of::<CSTL_StringVal__bindgen_ty_1>() - 16usize];
577    ["Alignment of CSTL_StringVal__bindgen_ty_1"]
578        [::std::mem::align_of::<CSTL_StringVal__bindgen_ty_1>() - 8usize];
579    ["Offset of field: CSTL_StringVal__bindgen_ty_1::buf"]
580        [::std::mem::offset_of!(CSTL_StringVal__bindgen_ty_1, buf) - 0usize];
581    ["Offset of field: CSTL_StringVal__bindgen_ty_1::ptr"]
582        [::std::mem::offset_of!(CSTL_StringVal__bindgen_ty_1, ptr) - 0usize];
583};
584#[allow(clippy::unnecessary_operation, clippy::identity_op)]
585const _: () = {
586    ["Size of CSTL_StringVal"][::std::mem::size_of::<CSTL_StringVal>() - 32usize];
587    ["Alignment of CSTL_StringVal"][::std::mem::align_of::<CSTL_StringVal>() - 8usize];
588    ["Offset of field: CSTL_StringVal::bx"][::std::mem::offset_of!(CSTL_StringVal, bx) - 0usize];
589    ["Offset of field: CSTL_StringVal::size"]
590        [::std::mem::offset_of!(CSTL_StringVal, size) - 16usize];
591    ["Offset of field: CSTL_StringVal::res"][::std::mem::offset_of!(CSTL_StringVal, res) - 24usize];
592};
593#[doc = " Reference to a mutable `CSTL_StringVal`.\n\n Must not be null.\n"]
594pub type CSTL_StringRef = *mut CSTL_StringVal;
595#[doc = " Reference to a const `CSTL_StringVal`.\n\n Must not be null.\n"]
596pub type CSTL_StringCRef = *const CSTL_StringVal;
597unsafe extern "C" {
598    #[doc = " Initializes the string, but does not allocate any memory.\n\n An initialized string can be trivially destroyed without leaks as long\n as its owned string is small enough to be inline (smaller than CSTL_string_alloc_mask).\n\n Re-initializing a string with a backing memory allocation will leak the old\n memory allocation.\n"]
599    pub fn CSTL_string_construct(new_instance: *mut CSTL_StringVal);
600}
601unsafe extern "C" {
602    #[doc = " Destroys the string, freeing the backing storage if necessary.\n"]
603    pub fn CSTL_string_destroy(instance: CSTL_StringRef, alloc: *mut CSTL_Alloc);
604}
605unsafe extern "C" {
606    #[doc = " Initializes the string with the substring at offset `other_off`\n in `other` with the length given by `count`.\n\n If `new_instance == NULL` or if `other_off` is outside of the range\n `[other, other + CSTL_string_size(other)]` returns `false` and does nothing,\n otherwise it returns `true`.\n\n If `new_instance == other` the substring operation is performed in-place without\n de-initializing `other`.\n\n Remember that re-initializing a different string with a backing memory allocation\n will leak the old memory allocation.\n"]
607    pub fn CSTL_string_substr(
608        new_instance: *mut CSTL_StringVal,
609        other: CSTL_StringCRef,
610        other_off: usize,
611        count: usize,
612        alloc: *mut CSTL_Alloc,
613    ) -> bool;
614}
615unsafe extern "C" {
616    #[doc = " Replaces the contents of `instance` with the null-terminated string at `ptr`.\n\n If the length of the string at `ptr` is greater than `CSTL_string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
617    pub fn CSTL_string_assign(
618        instance: CSTL_StringRef,
619        ptr: *const ::std::os::raw::c_char,
620        alloc: *mut CSTL_Alloc,
621    ) -> bool;
622}
623unsafe extern "C" {
624    #[doc = " Replaces the contents of `instance` with the first `count` characters of the string at `ptr`.\n\n If `n` is greater than `CSTL_string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
625    pub fn CSTL_string_assign_n(
626        instance: CSTL_StringRef,
627        ptr: *const ::std::os::raw::c_char,
628        count: usize,
629        alloc: *mut CSTL_Alloc,
630    ) -> bool;
631}
632unsafe extern "C" {
633    #[doc = " Replaces the contents of `instance` with the `count` copies of the character `ch`.\n\n If `count` is greater than `CSTL_string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
634    pub fn CSTL_string_assign_char(
635        instance: CSTL_StringRef,
636        count: usize,
637        ch: ::std::os::raw::c_char,
638        alloc: *mut CSTL_Alloc,
639    ) -> bool;
640}
641unsafe extern "C" {
642    #[doc = " Replaces the contents of `instance` with the substring at offset `other_off` in `other`\n with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_string_size(other)]` returns\n `false` and does nothing, otherwise it returns `true`.\n"]
643    pub fn CSTL_string_assign_substr(
644        instance: CSTL_StringRef,
645        other: CSTL_StringCRef,
646        other_off: usize,
647        count: usize,
648        alloc: *mut CSTL_Alloc,
649    ) -> bool;
650}
651unsafe extern "C" {
652    #[doc = " Replaces the contents of `instance` with the contents of `other_instance`.\n\n If `propagate_alloc == true && alloc != other_alloc` then storage\n is freed with `alloc` and allocated again with `other_alloc` before contents\n are copied. Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false` `instance` keeps using `alloc` as its allocator,\n potentially reusing its storage.\n\n You are responsible for replacing the allocator outside of `CSTL_StringVal` if applicable.\n"]
653    pub fn CSTL_string_copy_assign(
654        instance: CSTL_StringRef,
655        alloc: *mut CSTL_Alloc,
656        other_instance: CSTL_StringCRef,
657        other_alloc: *mut CSTL_Alloc,
658        propagate_alloc: bool,
659    );
660}
661unsafe extern "C" {
662    #[doc = " Moves the contents of `other_instance` to the contents of `instance`.\n\n If `propagate_alloc == true` storage is replaced with storage of `other_instance`.\n Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false && alloc != other_alloc` then storage is reused\n and individual characters of `other` are moved in. Then, `instance` uses `alloc` as its allocator.\n\n You are responsible for replacing the allocator outside of `CSTL_StringVal` if applicable.\n"]
663    pub fn CSTL_string_move_assign(
664        instance: CSTL_StringRef,
665        alloc: *mut CSTL_Alloc,
666        other_instance: CSTL_StringRef,
667        other_alloc: *mut CSTL_Alloc,
668        propagate_alloc: bool,
669    );
670}
671unsafe extern "C" {
672    #[doc = " Swaps string contents.\n\n You are responsible for swapping the allocators.\n"]
673    pub fn CSTL_string_swap(instance: CSTL_StringRef, other_instance: CSTL_StringRef);
674}
675unsafe extern "C" {
676    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_string_length(instance)` the behavior is undefined.\n"]
677    pub fn CSTL_string_index(instance: CSTL_StringRef, pos: usize) -> *mut ::std::os::raw::c_char;
678}
679unsafe extern "C" {
680    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_string_length(instance)` the behavior is undefined.\n"]
681    pub fn CSTL_string_const_index(
682        instance: CSTL_StringCRef,
683        pos: usize,
684    ) -> *const ::std::os::raw::c_char;
685}
686unsafe extern "C" {
687    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_string_length(instance)` a null pointer is returned.\n"]
688    pub fn CSTL_string_at(instance: CSTL_StringRef, pos: usize) -> *mut ::std::os::raw::c_char;
689}
690unsafe extern "C" {
691    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_string_length(instance)` a null pointer is returned.\n"]
692    pub fn CSTL_string_const_at(
693        instance: CSTL_StringCRef,
694        pos: usize,
695    ) -> *const ::std::os::raw::c_char;
696}
697unsafe extern "C" {
698    #[doc = " Returns a pointer to the first character.\n\n If `CSTL_string_empty(instance) == true` the behavior is undefined.\n"]
699    pub fn CSTL_string_front(instance: CSTL_StringRef) -> *mut ::std::os::raw::c_char;
700}
701unsafe extern "C" {
702    #[doc = " Returns a const pointer to the first character.\n\n If `CSTL_string_empty(instance) == true` the behavior is undefined.\n"]
703    pub fn CSTL_string_const_front(instance: CSTL_StringCRef) -> *const ::std::os::raw::c_char;
704}
705unsafe extern "C" {
706    #[doc = " Returns a pointer to the last character.\n\n If `CSTL_string_empty(instance) == true` the behavior is undefined.\n"]
707    pub fn CSTL_string_back(instance: CSTL_StringRef) -> *mut ::std::os::raw::c_char;
708}
709unsafe extern "C" {
710    #[doc = " Returns a const pointer to the last character.\n\n If `CSTL_string_empty(instance) == true` the behavior is undefined.\n"]
711    pub fn CSTL_string_const_back(instance: CSTL_StringCRef) -> *const ::std::os::raw::c_char;
712}
713unsafe extern "C" {
714    #[doc = " Returns a pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_string_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_string_data(instance), CSTL_string_data(instance) + size]`\n is always valid.\n\n The array may be mutated through the returned pointer excluding\n the past-the-end null terminator.\n"]
715    pub fn CSTL_string_data(instance: CSTL_StringRef) -> *mut ::std::os::raw::c_char;
716}
717unsafe extern "C" {
718    #[doc = " Returns a const pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_string_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_string_c_str(instance), CSTL_string_c_str(instance) + size]`\n is always valid.\n"]
719    pub fn CSTL_string_c_str(instance: CSTL_StringCRef) -> *const ::std::os::raw::c_char;
720}
721unsafe extern "C" {
722    #[doc = " Returns an iterator (pointer) to the first character of the string.\n\n If `CSTL_string_empty(instance) == true` then\n `CSTL_string_begin(instance) == CSTL_string_end(instance)`.\n"]
723    pub fn CSTL_string_begin(instance: CSTL_StringRef) -> *mut ::std::os::raw::c_char;
724}
725unsafe extern "C" {
726    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_string_empty(instance) == true` then\n `CSTL_string_begin(instance) == CSTL_string_end(instance)`.\n"]
727    pub fn CSTL_string_const_begin(instance: CSTL_StringCRef) -> *const ::std::os::raw::c_char;
728}
729unsafe extern "C" {
730    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_string_empty(instance) == true` then\n `CSTL_string_begin(instance) == CSTL_string_end(instance)`.\n"]
731    pub fn CSTL_string_end(instance: CSTL_StringRef) -> *mut ::std::os::raw::c_char;
732}
733unsafe extern "C" {
734    #[doc = " Returns a const iterator (pointer) past the last character of the string.\n\n If `CSTL_string_empty(instance) == true` then\n `CSTL_string_const_begin(instance) == CSTL_string_const_end(instance)`.\n"]
735    pub fn CSTL_string_const_end(instance: CSTL_StringCRef) -> *const ::std::os::raw::c_char;
736}
737unsafe extern "C" {
738    #[doc = " Returns `true` if the string is empty or `false` otherwise.\n"]
739    pub fn CSTL_string_empty(instance: CSTL_StringCRef) -> bool;
740}
741unsafe extern "C" {
742    #[doc = " Returns the number of characters in the string.\n"]
743    pub fn CSTL_string_size(instance: CSTL_StringCRef) -> usize;
744}
745unsafe extern "C" {
746    #[doc = " Returns the number of characters in the string.\n"]
747    pub fn CSTL_string_length(instance: CSTL_StringCRef) -> usize;
748}
749unsafe extern "C" {
750    #[doc = " Returns the total characters capacity of the string.\n"]
751    pub fn CSTL_string_capacity(instance: CSTL_StringCRef) -> usize;
752}
753unsafe extern "C" {
754    #[doc = " Returns the maximum possible number of characters in the string.\n"]
755    pub fn CSTL_string_max_size() -> usize;
756}
757unsafe extern "C" {
758    #[doc = " If `new_capacity > CSTL_string_capacity(instance)`, reallocates and expands\n the underlying array storage.\n\n If `new_capacity` exceeds `CSTL_string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
759    pub fn CSTL_string_reserve(
760        instance: CSTL_StringRef,
761        new_capacity: usize,
762        alloc: *mut CSTL_Alloc,
763    ) -> bool;
764}
765unsafe extern "C" {
766    #[doc = " Request removal of unused capacity.\n"]
767    pub fn CSTL_string_shrink_to_fit(instance: CSTL_StringRef, alloc: *mut CSTL_Alloc);
768}
769unsafe extern "C" {
770    #[doc = " Erase all characters from the string without affecting capacity.\n"]
771    pub fn CSTL_string_clear(instance: CSTL_StringRef);
772}
773unsafe extern "C" {
774    #[doc = " Inserts the null-terminated string at `ptr` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
775    pub fn CSTL_string_insert(
776        instance: CSTL_StringRef,
777        where_: *const ::std::os::raw::c_char,
778        ptr: *const ::std::os::raw::c_char,
779        alloc: *mut CSTL_Alloc,
780    ) -> *mut ::std::os::raw::c_char;
781}
782unsafe extern "C" {
783    #[doc = " Inserts the first `count` characters of the string at `ptr` at the pointer  `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
784    pub fn CSTL_string_insert_n(
785        instance: CSTL_StringRef,
786        where_: *const ::std::os::raw::c_char,
787        ptr: *const ::std::os::raw::c_char,
788        count: usize,
789        alloc: *mut CSTL_Alloc,
790    ) -> *mut ::std::os::raw::c_char;
791}
792unsafe extern "C" {
793    #[doc = " Inserts `count` copies of the character `ch` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
794    pub fn CSTL_string_insert_char(
795        instance: CSTL_StringRef,
796        where_: *const ::std::os::raw::c_char,
797        count: usize,
798        ch: ::std::os::raw::c_char,
799        alloc: *mut CSTL_Alloc,
800    ) -> *mut ::std::os::raw::c_char;
801}
802unsafe extern "C" {
803    #[doc = " Inserts the string `other` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
804    pub fn CSTL_string_insert_str(
805        instance: CSTL_StringRef,
806        where_: *const ::std::os::raw::c_char,
807        other: CSTL_StringCRef,
808        alloc: *mut CSTL_Alloc,
809    ) -> *mut ::std::os::raw::c_char;
810}
811unsafe extern "C" {
812    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at the pointer `where` in `instance`.\n\n If `other_off` is outside of the range `[other, other + CSTL_string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
813    pub fn CSTL_string_insert_substr(
814        instance: CSTL_StringRef,
815        where_: *const ::std::os::raw::c_char,
816        other: CSTL_StringCRef,
817        other_off: usize,
818        count: usize,
819        alloc: *mut CSTL_Alloc,
820    ) -> *mut ::std::os::raw::c_char;
821}
822unsafe extern "C" {
823    #[doc = " Inserts the null-terminated string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
824    pub fn CSTL_string_insert_at(
825        instance: CSTL_StringRef,
826        off: usize,
827        ptr: *const ::std::os::raw::c_char,
828        alloc: *mut CSTL_Alloc,
829    ) -> bool;
830}
831unsafe extern "C" {
832    #[doc = " Inserts the first `count` characters of the string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
833    pub fn CSTL_string_insert_n_at(
834        instance: CSTL_StringRef,
835        off: usize,
836        ptr: *const ::std::os::raw::c_char,
837        count: usize,
838        alloc: *mut CSTL_Alloc,
839    ) -> bool;
840}
841unsafe extern "C" {
842    #[doc = " Inserts `count` copies of the character `ch` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
843    pub fn CSTL_string_insert_char_at(
844        instance: CSTL_StringRef,
845        off: usize,
846        count: usize,
847        ch: ::std::os::raw::c_char,
848        alloc: *mut CSTL_Alloc,
849    ) -> bool;
850}
851unsafe extern "C" {
852    #[doc = " Inserts the string `other` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
853    pub fn CSTL_string_insert_str_at(
854        instance: CSTL_StringRef,
855        off: usize,
856        other: CSTL_StringCRef,
857        alloc: *mut CSTL_Alloc,
858    ) -> bool;
859}
860unsafe extern "C" {
861    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
862    pub fn CSTL_string_insert_substr_at(
863        instance: CSTL_StringRef,
864        off: usize,
865        other: CSTL_StringCRef,
866        other_off: usize,
867        count: usize,
868        alloc: *mut CSTL_Alloc,
869    ) -> bool;
870}
871unsafe extern "C" {
872    #[doc = " Removes the character at `where` and returns a pointer following the\n removed character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
873    pub fn CSTL_string_erase(
874        instance: CSTL_StringRef,
875        where_: *const ::std::os::raw::c_char,
876    ) -> *mut ::std::os::raw::c_char;
877}
878unsafe extern "C" {
879    #[doc = " Removes the characters in the range `[first, last)` and returns a pointer following the\n removed character.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
880    pub fn CSTL_string_erase_substr(
881        instance: CSTL_StringRef,
882        first: *const ::std::os::raw::c_char,
883        last: *const ::std::os::raw::c_char,
884    ) -> *mut ::std::os::raw::c_char;
885}
886unsafe extern "C" {
887    #[doc = " Removes the character at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
888    pub fn CSTL_string_erase_at(instance: CSTL_StringRef, off: usize) -> bool;
889}
890unsafe extern "C" {
891    #[doc = " Removes the substring at offset `off` in `instance` with the length given by `count`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
892    pub fn CSTL_string_erase_substr_at(instance: CSTL_StringRef, off: usize, count: usize) -> bool;
893}
894unsafe extern "C" {
895    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_string_size(instance) == CSTL_string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
896    pub fn CSTL_string_push_back(
897        instance: CSTL_StringRef,
898        ch: ::std::os::raw::c_char,
899        alloc: *mut CSTL_Alloc,
900    ) -> bool;
901}
902unsafe extern "C" {
903    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_string_size(instance) == CSTL_string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
904    pub fn CSTL_string_pop_back(instance: CSTL_StringRef);
905}
906unsafe extern "C" {
907    #[doc = " Appends the null-terminated string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
908    pub fn CSTL_string_append(
909        instance: CSTL_StringRef,
910        ptr: *const ::std::os::raw::c_char,
911        alloc: *mut CSTL_Alloc,
912    ) -> bool;
913}
914unsafe extern "C" {
915    #[doc = " Appends the first `count` characters of the string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
916    pub fn CSTL_string_append_n(
917        instance: CSTL_StringRef,
918        ptr: *const ::std::os::raw::c_char,
919        count: usize,
920        alloc: *mut CSTL_Alloc,
921    ) -> bool;
922}
923unsafe extern "C" {
924    #[doc = " Appends `count` copies of the character `ch` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
925    pub fn CSTL_string_append_char(
926        instance: CSTL_StringRef,
927        count: usize,
928        ch: ::std::os::raw::c_char,
929        alloc: *mut CSTL_Alloc,
930    ) -> bool;
931}
932unsafe extern "C" {
933    #[doc = " Appends the string `other` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
934    pub fn CSTL_string_append_str(
935        instance: CSTL_StringRef,
936        other: CSTL_StringCRef,
937        alloc: *mut CSTL_Alloc,
938    ) -> bool;
939}
940unsafe extern "C" {
941    #[doc = " Appends the substring at offset `other_off` in `other` with the length\n given by `count` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
942    pub fn CSTL_string_append_substr(
943        instance: CSTL_StringRef,
944        other: CSTL_StringCRef,
945        other_off: usize,
946        count: usize,
947        alloc: *mut CSTL_Alloc,
948    ) -> bool;
949}
950unsafe extern "C" {
951    #[doc = " Replaces the characters in the range `[first, last)` with the null-terminated\n string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
952    pub fn CSTL_string_replace(
953        instance: CSTL_StringRef,
954        first: *const ::std::os::raw::c_char,
955        last: *const ::std::os::raw::c_char,
956        ptr: *const ::std::os::raw::c_char,
957        alloc: *mut CSTL_Alloc,
958    ) -> bool;
959}
960unsafe extern "C" {
961    #[doc = " Replaces the characters in the range `[first, last)` with the first `count`\n characters of the string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
962    pub fn CSTL_string_replace_n(
963        instance: CSTL_StringRef,
964        first: *const ::std::os::raw::c_char,
965        last: *const ::std::os::raw::c_char,
966        ptr: *const ::std::os::raw::c_char,
967        count: usize,
968        alloc: *mut CSTL_Alloc,
969    ) -> bool;
970}
971unsafe extern "C" {
972    #[doc = " Replaces the characters in the range `[first, last)` with `count` copies\n of the character `ch`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
973    pub fn CSTL_string_replace_char(
974        instance: CSTL_StringRef,
975        first: *const ::std::os::raw::c_char,
976        last: *const ::std::os::raw::c_char,
977        count: usize,
978        ch: ::std::os::raw::c_char,
979        alloc: *mut CSTL_Alloc,
980    ) -> bool;
981}
982unsafe extern "C" {
983    #[doc = " Replaces the characters in the range `[first, last)` with the string `other`.\n\n If the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
984    pub fn CSTL_string_replace_str(
985        instance: CSTL_StringRef,
986        first: *const ::std::os::raw::c_char,
987        last: *const ::std::os::raw::c_char,
988        other: CSTL_StringCRef,
989        alloc: *mut CSTL_Alloc,
990    ) -> bool;
991}
992unsafe extern "C" {
993    #[doc = " Replaces the characters in the range `[first, last)` with the substring\n at offset `other_off` in `other` with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
994    pub fn CSTL_string_replace_substr(
995        instance: CSTL_StringRef,
996        first: *const ::std::os::raw::c_char,
997        last: *const ::std::os::raw::c_char,
998        other: CSTL_StringCRef,
999        other_off: usize,
1000        count: usize,
1001        alloc: *mut CSTL_Alloc,
1002    ) -> bool;
1003}
1004unsafe extern "C" {
1005    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the null-terminated string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1006    pub fn CSTL_string_replace_at(
1007        instance: CSTL_StringRef,
1008        off: usize,
1009        count: usize,
1010        ptr: *const ::std::os::raw::c_char,
1011        alloc: *mut CSTL_Alloc,
1012    ) -> bool;
1013}
1014unsafe extern "C" {
1015    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the first `count2` characters of the string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1016    pub fn CSTL_string_replace_n_at(
1017        instance: CSTL_StringRef,
1018        off: usize,
1019        count: usize,
1020        ptr: *const ::std::os::raw::c_char,
1021        count2: usize,
1022        alloc: *mut CSTL_Alloc,
1023    ) -> bool;
1024}
1025unsafe extern "C" {
1026    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with `count` copies of the character `ch`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1027    pub fn CSTL_string_replace_char_at(
1028        instance: CSTL_StringRef,
1029        off: usize,
1030        count: usize,
1031        count2: usize,
1032        ch: ::std::os::raw::c_char,
1033        alloc: *mut CSTL_Alloc,
1034    ) -> bool;
1035}
1036unsafe extern "C" {
1037    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the string `other`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1038    pub fn CSTL_string_replace_str_at(
1039        instance: CSTL_StringRef,
1040        off: usize,
1041        count: usize,
1042        other: CSTL_StringCRef,
1043        alloc: *mut CSTL_Alloc,
1044    ) -> bool;
1045}
1046unsafe extern "C" {
1047    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the substring at offset `other_off` in `other` with the length\n given by `count2`.\n\n If `off` is outside of the range `[instance, instance + CSTL_string_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1048    pub fn CSTL_string_replace_substr_at(
1049        instance: CSTL_StringRef,
1050        off: usize,
1051        count: usize,
1052        other: CSTL_StringCRef,
1053        other_off: usize,
1054        count2: usize,
1055        alloc: *mut CSTL_Alloc,
1056    ) -> bool;
1057}
1058unsafe extern "C" {
1059    #[doc = " Copies a substring `[off, off + count)` to character string pointed to by\n `dest`. The resulting character string is not null terminated.\n\n Returns the number of characters copied or `CSTL_string_npos` if\n `off > CSTL_string_size(instance)` (out of range).\n"]
1060    pub fn CSTL_string_copy(
1061        instance: CSTL_StringCRef,
1062        dest: *mut ::std::os::raw::c_char,
1063        count: usize,
1064        off: usize,
1065    ) -> usize;
1066}
1067unsafe extern "C" {
1068    #[doc = " Resizes the string to contain `new_size` characters, appending `ch`\n if current size is less than `new_size`.\n\n If `new_size` is greater than `CSTL_string_max_size()` this\n function has no effect and returns `false`, otherwise it returns `true`.\n"]
1069    pub fn CSTL_string_resize(
1070        instance: CSTL_StringRef,
1071        new_size: usize,
1072        ch: ::std::os::raw::c_char,
1073        alloc: *mut CSTL_Alloc,
1074    ) -> bool;
1075}
1076unsafe extern "C" {
1077    #[doc = " Find the first from offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1078    pub fn CSTL_string_find(
1079        instance: CSTL_StringCRef,
1080        ptr: *const ::std::os::raw::c_char,
1081        off: usize,
1082    ) -> usize;
1083}
1084unsafe extern "C" {
1085    #[doc = " Find the first from offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1086    pub fn CSTL_string_find_n(
1087        instance: CSTL_StringCRef,
1088        ptr: *const ::std::os::raw::c_char,
1089        off: usize,
1090        count: usize,
1091    ) -> usize;
1092}
1093unsafe extern "C" {
1094    #[doc = " Find the first from offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1095    pub fn CSTL_string_find_char(
1096        instance: CSTL_StringCRef,
1097        ch: ::std::os::raw::c_char,
1098        off: usize,
1099    ) -> usize;
1100}
1101unsafe extern "C" {
1102    #[doc = " Find the first from offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1103    pub fn CSTL_string_find_str(
1104        instance: CSTL_StringCRef,
1105        other: CSTL_StringCRef,
1106        off: usize,
1107    ) -> usize;
1108}
1109unsafe extern "C" {
1110    #[doc = " Find the last before offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1111    pub fn CSTL_string_rfind(
1112        instance: CSTL_StringCRef,
1113        ptr: *const ::std::os::raw::c_char,
1114        off: usize,
1115    ) -> usize;
1116}
1117unsafe extern "C" {
1118    #[doc = " Find the last before offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1119    pub fn CSTL_string_rfind_n(
1120        instance: CSTL_StringCRef,
1121        ptr: *const ::std::os::raw::c_char,
1122        off: usize,
1123        count: usize,
1124    ) -> usize;
1125}
1126unsafe extern "C" {
1127    #[doc = " Find the last before offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1128    pub fn CSTL_string_rfind_char(
1129        instance: CSTL_StringCRef,
1130        ch: ::std::os::raw::c_char,
1131        off: usize,
1132    ) -> usize;
1133}
1134unsafe extern "C" {
1135    #[doc = " Find the last before offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1136    pub fn CSTL_string_rfind_str(
1137        instance: CSTL_StringCRef,
1138        other: CSTL_StringCRef,
1139        off: usize,
1140    ) -> usize;
1141}
1142unsafe extern "C" {
1143    #[doc = " Compare two null-terminated character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
1144    pub fn CSTL_string_compare(
1145        left: *const ::std::os::raw::c_char,
1146        right: *const ::std::os::raw::c_char,
1147    ) -> ::std::os::raw::c_int;
1148}
1149unsafe extern "C" {
1150    #[doc = " Compare an explicit length character sequence with a null-terminated one.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n To compare an explicit length `left` and a null-terminated `right`,\n swap them and negate the result: `-CSTL_string_compare_n(right, left, left_count)`.\n\n There is no `CSTL_String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
1151    pub fn CSTL_string_compare_n(
1152        left: *const ::std::os::raw::c_char,
1153        right: *const ::std::os::raw::c_char,
1154        right_count: usize,
1155    ) -> ::std::os::raw::c_int;
1156}
1157unsafe extern "C" {
1158    #[doc = " Compare two explicit length character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
1159    pub fn CSTL_string_compare_nn(
1160        left: *const ::std::os::raw::c_char,
1161        left_count: usize,
1162        right: *const ::std::os::raw::c_char,
1163        right_count: usize,
1164    ) -> ::std::os::raw::c_int;
1165}
1166#[doc = " STL ABI `std::basic_string` layout.\n\n Does not include the allocator, which nonetheless is a part of the `std::basic_string`\n structure! You are responsible for including it, since it can take on any form.\n\n Do not manipulate the members directly, use the associated functions!\n"]
1167#[repr(C)]
1168pub struct CSTL_WideStringVal {
1169    pub bx: CSTL_WideStringVal__bindgen_ty_1,
1170    pub size: usize,
1171    pub res: usize,
1172}
1173#[repr(C)]
1174#[derive(Copy, Clone)]
1175pub union CSTL_WideStringVal__bindgen_ty_1 {
1176    pub buf: [wchar_t; 8usize],
1177    pub ptr: *mut wchar_t,
1178}
1179#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1180const _: () = {
1181    ["Size of CSTL_WideStringVal__bindgen_ty_1"]
1182        [::std::mem::size_of::<CSTL_WideStringVal__bindgen_ty_1>() - 16usize];
1183    ["Alignment of CSTL_WideStringVal__bindgen_ty_1"]
1184        [::std::mem::align_of::<CSTL_WideStringVal__bindgen_ty_1>() - 8usize];
1185    ["Offset of field: CSTL_WideStringVal__bindgen_ty_1::buf"]
1186        [::std::mem::offset_of!(CSTL_WideStringVal__bindgen_ty_1, buf) - 0usize];
1187    ["Offset of field: CSTL_WideStringVal__bindgen_ty_1::ptr"]
1188        [::std::mem::offset_of!(CSTL_WideStringVal__bindgen_ty_1, ptr) - 0usize];
1189};
1190#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1191const _: () = {
1192    ["Size of CSTL_WideStringVal"][::std::mem::size_of::<CSTL_WideStringVal>() - 32usize];
1193    ["Alignment of CSTL_WideStringVal"][::std::mem::align_of::<CSTL_WideStringVal>() - 8usize];
1194    ["Offset of field: CSTL_WideStringVal::bx"]
1195        [::std::mem::offset_of!(CSTL_WideStringVal, bx) - 0usize];
1196    ["Offset of field: CSTL_WideStringVal::size"]
1197        [::std::mem::offset_of!(CSTL_WideStringVal, size) - 16usize];
1198    ["Offset of field: CSTL_WideStringVal::res"]
1199        [::std::mem::offset_of!(CSTL_WideStringVal, res) - 24usize];
1200};
1201#[doc = " Reference to a mutable `CSTL_WideStringVal`.\n\n Must not be null.\n"]
1202pub type CSTL_WideStringRef = *mut CSTL_WideStringVal;
1203#[doc = " Reference to a const `CSTL_WideStringVal`.\n\n Must not be null.\n"]
1204pub type CSTL_WideStringCRef = *const CSTL_WideStringVal;
1205unsafe extern "C" {
1206    #[doc = " Initializes the string, but does not allocate any memory.\n\n An initialized string can be trivially destroyed without leaks as long\n as its owned string is small enough to be inline (smaller than CSTL_string_alloc_mask).\n\n Re-initializing a string with a backing memory allocation will leak the old\n memory allocation.\n"]
1207    pub fn CSTL_wstring_construct(new_instance: *mut CSTL_WideStringVal);
1208}
1209unsafe extern "C" {
1210    #[doc = " Destroys the string, freeing the backing storage if necessary.\n"]
1211    pub fn CSTL_wstring_destroy(instance: CSTL_WideStringRef, alloc: *mut CSTL_Alloc);
1212}
1213unsafe extern "C" {
1214    #[doc = " Initializes the string with the substring at offset `other_off`\n in `other` with the length given by `count`.\n\n If `new_instance == NULL` or if `other_off` is outside of the range\n `[other, other + CSTL_wstring_size(other)]` returns `false` and does nothing,\n otherwise it returns `true`.\n\n If `new_instance == other` the substring operation is performed in-place without\n de-initializing `other`.\n\n Remember that re-initializing a different string with a backing memory allocation\n will leak the old memory allocation.\n"]
1215    pub fn CSTL_wstring_substr(
1216        new_instance: *mut CSTL_WideStringVal,
1217        other: CSTL_WideStringCRef,
1218        other_off: usize,
1219        count: usize,
1220        alloc: *mut CSTL_Alloc,
1221    ) -> bool;
1222}
1223unsafe extern "C" {
1224    #[doc = " Replaces the contents of `instance` with the null-terminated string at `ptr`.\n\n If the length of the string at `ptr` is greater than `CSTL_wstring_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
1225    pub fn CSTL_wstring_assign(
1226        instance: CSTL_WideStringRef,
1227        ptr: *const wchar_t,
1228        alloc: *mut CSTL_Alloc,
1229    ) -> bool;
1230}
1231unsafe extern "C" {
1232    #[doc = " Replaces the contents of `instance` with the first `count` characters of the string at `ptr`.\n\n If `n` is greater than `CSTL_wstring_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
1233    pub fn CSTL_wstring_assign_n(
1234        instance: CSTL_WideStringRef,
1235        ptr: *const wchar_t,
1236        count: usize,
1237        alloc: *mut CSTL_Alloc,
1238    ) -> bool;
1239}
1240unsafe extern "C" {
1241    #[doc = " Replaces the contents of `instance` with the `count` copies of the character `ch`.\n\n If `count` is greater than `CSTL_wstring_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
1242    pub fn CSTL_wstring_assign_char(
1243        instance: CSTL_WideStringRef,
1244        count: usize,
1245        ch: wchar_t,
1246        alloc: *mut CSTL_Alloc,
1247    ) -> bool;
1248}
1249unsafe extern "C" {
1250    #[doc = " Replaces the contents of `instance` with the substring at offset `other_off` in `other`\n with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_wstring_size(other)]` returns\n `false` and does nothing, otherwise it returns `true`.\n"]
1251    pub fn CSTL_wstring_assign_substr(
1252        instance: CSTL_WideStringRef,
1253        other: CSTL_WideStringCRef,
1254        other_off: usize,
1255        count: usize,
1256        alloc: *mut CSTL_Alloc,
1257    ) -> bool;
1258}
1259unsafe extern "C" {
1260    #[doc = " Replaces the contents of `instance` with the contents of `other_instance`.\n\n If `propagate_alloc == true && alloc != other_alloc` then storage\n is freed with `alloc` and allocated again with `other_alloc` before contents\n are copied. Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false` `instance` keeps using `alloc` as its allocator,\n potentially reusing its storage.\n\n You are responsible for replacing the allocator outside of `CSTL_WideStringVal` if applicable.\n"]
1261    pub fn CSTL_wstring_copy_assign(
1262        instance: CSTL_WideStringRef,
1263        alloc: *mut CSTL_Alloc,
1264        other_instance: CSTL_WideStringCRef,
1265        other_alloc: *mut CSTL_Alloc,
1266        propagate_alloc: bool,
1267    );
1268}
1269unsafe extern "C" {
1270    #[doc = " Moves the contents of `other_instance` to the contents of `instance`.\n\n If `propagate_alloc == true` storage is replaced with storage of `other_instance`.\n Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false && alloc != other_alloc` then storage is reused\n and individual characters of `other` are moved in. Then, `instance` uses `alloc` as its allocator.\n\n You are responsible for replacing the allocator outside of `CSTL_WideStringVal` if applicable.\n"]
1271    pub fn CSTL_wstring_move_assign(
1272        instance: CSTL_WideStringRef,
1273        alloc: *mut CSTL_Alloc,
1274        other_instance: CSTL_WideStringRef,
1275        other_alloc: *mut CSTL_Alloc,
1276        propagate_alloc: bool,
1277    );
1278}
1279unsafe extern "C" {
1280    #[doc = " Swaps string contents.\n\n You are responsible for swapping the allocators.\n"]
1281    pub fn CSTL_wstring_swap(instance: CSTL_WideStringRef, other_instance: CSTL_WideStringRef);
1282}
1283unsafe extern "C" {
1284    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_wstring_length(instance)` the behavior is undefined.\n"]
1285    pub fn CSTL_wstring_index(instance: CSTL_WideStringRef, pos: usize) -> *mut wchar_t;
1286}
1287unsafe extern "C" {
1288    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_wstring_length(instance)` the behavior is undefined.\n"]
1289    pub fn CSTL_wstring_const_index(instance: CSTL_WideStringCRef, pos: usize) -> *const wchar_t;
1290}
1291unsafe extern "C" {
1292    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_wstring_length(instance)` a null pointer is returned.\n"]
1293    pub fn CSTL_wstring_at(instance: CSTL_WideStringRef, pos: usize) -> *mut wchar_t;
1294}
1295unsafe extern "C" {
1296    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_wstring_length(instance)` a null pointer is returned.\n"]
1297    pub fn CSTL_wstring_const_at(instance: CSTL_WideStringCRef, pos: usize) -> *const wchar_t;
1298}
1299unsafe extern "C" {
1300    #[doc = " Returns a pointer to the first character.\n\n If `CSTL_wstring_empty(instance) == true` the behavior is undefined.\n"]
1301    pub fn CSTL_wstring_front(instance: CSTL_WideStringRef) -> *mut wchar_t;
1302}
1303unsafe extern "C" {
1304    #[doc = " Returns a const pointer to the first character.\n\n If `CSTL_wstring_empty(instance) == true` the behavior is undefined.\n"]
1305    pub fn CSTL_wstring_const_front(instance: CSTL_WideStringCRef) -> *const wchar_t;
1306}
1307unsafe extern "C" {
1308    #[doc = " Returns a pointer to the last character.\n\n If `CSTL_wstring_empty(instance) == true` the behavior is undefined.\n"]
1309    pub fn CSTL_wstring_back(instance: CSTL_WideStringRef) -> *mut wchar_t;
1310}
1311unsafe extern "C" {
1312    #[doc = " Returns a const pointer to the last character.\n\n If `CSTL_wstring_empty(instance) == true` the behavior is undefined.\n"]
1313    pub fn CSTL_wstring_const_back(instance: CSTL_WideStringCRef) -> *const wchar_t;
1314}
1315unsafe extern "C" {
1316    #[doc = " Returns a pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_wstring_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_wstring_data(instance), CSTL_wstring_data(instance) + size]`\n is always valid.\n\n The array may be mutated through the returned pointer excluding\n the past-the-end null terminator.\n"]
1317    pub fn CSTL_wstring_data(instance: CSTL_WideStringRef) -> *mut wchar_t;
1318}
1319unsafe extern "C" {
1320    #[doc = " Returns a const pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_wstring_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_wstring_c_str(instance), CSTL_wstring_c_str(instance) + size]`\n is always valid.\n"]
1321    pub fn CSTL_wstring_c_str(instance: CSTL_WideStringCRef) -> *const wchar_t;
1322}
1323unsafe extern "C" {
1324    #[doc = " Returns an iterator (pointer) to the first character of the string.\n\n If `CSTL_wstring_empty(instance) == true` then\n `CSTL_wstring_begin(instance) == CSTL_wstring_end(instance)`.\n"]
1325    pub fn CSTL_wstring_begin(instance: CSTL_WideStringRef) -> *mut wchar_t;
1326}
1327unsafe extern "C" {
1328    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_wstring_empty(instance) == true` then\n `CSTL_wstring_begin(instance) == CSTL_wstring_end(instance)`.\n"]
1329    pub fn CSTL_wstring_const_begin(instance: CSTL_WideStringCRef) -> *const wchar_t;
1330}
1331unsafe extern "C" {
1332    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_wstring_empty(instance) == true` then\n `CSTL_wstring_begin(instance) == CSTL_wstring_end(instance)`.\n"]
1333    pub fn CSTL_wstring_end(instance: CSTL_WideStringRef) -> *mut wchar_t;
1334}
1335unsafe extern "C" {
1336    #[doc = " Returns a const iterator (pointer) past the last character of the string.\n\n If `CSTL_wstring_empty(instance) == true` then\n `CSTL_wstring_const_begin(instance) == CSTL_wstring_const_end(instance)`.\n"]
1337    pub fn CSTL_wstring_const_end(instance: CSTL_WideStringCRef) -> *const wchar_t;
1338}
1339unsafe extern "C" {
1340    #[doc = " Returns `true` if the string is empty or `false` otherwise.\n"]
1341    pub fn CSTL_wstring_empty(instance: CSTL_WideStringCRef) -> bool;
1342}
1343unsafe extern "C" {
1344    #[doc = " Returns the number of characters in the string.\n"]
1345    pub fn CSTL_wstring_size(instance: CSTL_WideStringCRef) -> usize;
1346}
1347unsafe extern "C" {
1348    #[doc = " Returns the number of characters in the string.\n"]
1349    pub fn CSTL_wstring_length(instance: CSTL_WideStringCRef) -> usize;
1350}
1351unsafe extern "C" {
1352    #[doc = " Returns the total characters capacity of the string.\n"]
1353    pub fn CSTL_wstring_capacity(instance: CSTL_WideStringCRef) -> usize;
1354}
1355unsafe extern "C" {
1356    #[doc = " Returns the maximum possible number of characters in the string.\n"]
1357    pub fn CSTL_wstring_max_size() -> usize;
1358}
1359unsafe extern "C" {
1360    #[doc = " If `new_capacity > CSTL_wstring_capacity(instance)`, reallocates and expands\n the underlying array storage.\n\n If `new_capacity` exceeds `CSTL_wstring_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
1361    pub fn CSTL_wstring_reserve(
1362        instance: CSTL_WideStringRef,
1363        new_capacity: usize,
1364        alloc: *mut CSTL_Alloc,
1365    ) -> bool;
1366}
1367unsafe extern "C" {
1368    #[doc = " Request removal of unused capacity.\n"]
1369    pub fn CSTL_wstring_shrink_to_fit(instance: CSTL_WideStringRef, alloc: *mut CSTL_Alloc);
1370}
1371unsafe extern "C" {
1372    #[doc = " Erase all characters from the string without affecting capacity.\n"]
1373    pub fn CSTL_wstring_clear(instance: CSTL_WideStringRef);
1374}
1375unsafe extern "C" {
1376    #[doc = " Inserts the null-terminated string at `ptr` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
1377    pub fn CSTL_wstring_insert(
1378        instance: CSTL_WideStringRef,
1379        where_: *const wchar_t,
1380        ptr: *const wchar_t,
1381        alloc: *mut CSTL_Alloc,
1382    ) -> *mut wchar_t;
1383}
1384unsafe extern "C" {
1385    #[doc = " Inserts the first `count` characters of the string at `ptr` at the pointer  `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
1386    pub fn CSTL_wstring_insert_n(
1387        instance: CSTL_WideStringRef,
1388        where_: *const wchar_t,
1389        ptr: *const wchar_t,
1390        count: usize,
1391        alloc: *mut CSTL_Alloc,
1392    ) -> *mut wchar_t;
1393}
1394unsafe extern "C" {
1395    #[doc = " Inserts `count` copies of the character `ch` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
1396    pub fn CSTL_wstring_insert_char(
1397        instance: CSTL_WideStringRef,
1398        where_: *const wchar_t,
1399        count: usize,
1400        ch: wchar_t,
1401        alloc: *mut CSTL_Alloc,
1402    ) -> *mut wchar_t;
1403}
1404unsafe extern "C" {
1405    #[doc = " Inserts the string `other` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
1406    pub fn CSTL_wstring_insert_str(
1407        instance: CSTL_WideStringRef,
1408        where_: *const wchar_t,
1409        other: CSTL_WideStringCRef,
1410        alloc: *mut CSTL_Alloc,
1411    ) -> *mut wchar_t;
1412}
1413unsafe extern "C" {
1414    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at the pointer `where` in `instance`.\n\n If `other_off` is outside of the range `[other, other + CSTL_wstring_size(other)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
1415    pub fn CSTL_wstring_insert_substr(
1416        instance: CSTL_WideStringRef,
1417        where_: *const wchar_t,
1418        other: CSTL_WideStringCRef,
1419        other_off: usize,
1420        count: usize,
1421        alloc: *mut CSTL_Alloc,
1422    ) -> *mut wchar_t;
1423}
1424unsafe extern "C" {
1425    #[doc = " Inserts the null-terminated string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1426    pub fn CSTL_wstring_insert_at(
1427        instance: CSTL_WideStringRef,
1428        off: usize,
1429        ptr: *const wchar_t,
1430        alloc: *mut CSTL_Alloc,
1431    ) -> bool;
1432}
1433unsafe extern "C" {
1434    #[doc = " Inserts the first `count` characters of the string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1435    pub fn CSTL_wstring_insert_n_at(
1436        instance: CSTL_WideStringRef,
1437        off: usize,
1438        ptr: *const wchar_t,
1439        count: usize,
1440        alloc: *mut CSTL_Alloc,
1441    ) -> bool;
1442}
1443unsafe extern "C" {
1444    #[doc = " Inserts `count` copies of the character `ch` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1445    pub fn CSTL_wstring_insert_char_at(
1446        instance: CSTL_WideStringRef,
1447        off: usize,
1448        count: usize,
1449        ch: wchar_t,
1450        alloc: *mut CSTL_Alloc,
1451    ) -> bool;
1452}
1453unsafe extern "C" {
1454    #[doc = " Inserts the string `other` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1455    pub fn CSTL_wstring_insert_str_at(
1456        instance: CSTL_WideStringRef,
1457        off: usize,
1458        other: CSTL_WideStringCRef,
1459        alloc: *mut CSTL_Alloc,
1460    ) -> bool;
1461}
1462unsafe extern "C" {
1463    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_wstring_size(other)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1464    pub fn CSTL_wstring_insert_substr_at(
1465        instance: CSTL_WideStringRef,
1466        off: usize,
1467        other: CSTL_WideStringCRef,
1468        other_off: usize,
1469        count: usize,
1470        alloc: *mut CSTL_Alloc,
1471    ) -> bool;
1472}
1473unsafe extern "C" {
1474    #[doc = " Removes the character at `where` and returns a pointer following the\n removed character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
1475    pub fn CSTL_wstring_erase(instance: CSTL_WideStringRef, where_: *const wchar_t)
1476        -> *mut wchar_t;
1477}
1478unsafe extern "C" {
1479    #[doc = " Removes the characters in the range `[first, last)` and returns a pointer following the\n removed character.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
1480    pub fn CSTL_wstring_erase_substr(
1481        instance: CSTL_WideStringRef,
1482        first: *const wchar_t,
1483        last: *const wchar_t,
1484    ) -> *mut wchar_t;
1485}
1486unsafe extern "C" {
1487    #[doc = " Removes the character at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1488    pub fn CSTL_wstring_erase_at(instance: CSTL_WideStringRef, off: usize) -> bool;
1489}
1490unsafe extern "C" {
1491    #[doc = " Removes the substring at offset `off` in `instance` with the length given by `count`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1492    pub fn CSTL_wstring_erase_substr_at(
1493        instance: CSTL_WideStringRef,
1494        off: usize,
1495        count: usize,
1496    ) -> bool;
1497}
1498unsafe extern "C" {
1499    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_wstring_size(instance) == CSTL_wstring_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
1500    pub fn CSTL_wstring_push_back(
1501        instance: CSTL_WideStringRef,
1502        ch: wchar_t,
1503        alloc: *mut CSTL_Alloc,
1504    ) -> bool;
1505}
1506unsafe extern "C" {
1507    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_wstring_size(instance) == CSTL_wstring_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
1508    pub fn CSTL_wstring_pop_back(instance: CSTL_WideStringRef);
1509}
1510unsafe extern "C" {
1511    #[doc = " Appends the null-terminated string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1512    pub fn CSTL_wstring_append(
1513        instance: CSTL_WideStringRef,
1514        ptr: *const wchar_t,
1515        alloc: *mut CSTL_Alloc,
1516    ) -> bool;
1517}
1518unsafe extern "C" {
1519    #[doc = " Appends the first `count` characters of the string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1520    pub fn CSTL_wstring_append_n(
1521        instance: CSTL_WideStringRef,
1522        ptr: *const wchar_t,
1523        count: usize,
1524        alloc: *mut CSTL_Alloc,
1525    ) -> bool;
1526}
1527unsafe extern "C" {
1528    #[doc = " Appends `count` copies of the character `ch` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1529    pub fn CSTL_wstring_append_char(
1530        instance: CSTL_WideStringRef,
1531        count: usize,
1532        ch: wchar_t,
1533        alloc: *mut CSTL_Alloc,
1534    ) -> bool;
1535}
1536unsafe extern "C" {
1537    #[doc = " Appends the string `other` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1538    pub fn CSTL_wstring_append_str(
1539        instance: CSTL_WideStringRef,
1540        other: CSTL_WideStringCRef,
1541        alloc: *mut CSTL_Alloc,
1542    ) -> bool;
1543}
1544unsafe extern "C" {
1545    #[doc = " Appends the substring at offset `other_off` in `other` with the length\n given by `count` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1546    pub fn CSTL_wstring_append_substr(
1547        instance: CSTL_WideStringRef,
1548        other: CSTL_WideStringCRef,
1549        other_off: usize,
1550        count: usize,
1551        alloc: *mut CSTL_Alloc,
1552    ) -> bool;
1553}
1554unsafe extern "C" {
1555    #[doc = " Replaces the characters in the range `[first, last)` with the null-terminated\n string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
1556    pub fn CSTL_wstring_replace(
1557        instance: CSTL_WideStringRef,
1558        first: *const wchar_t,
1559        last: *const wchar_t,
1560        ptr: *const wchar_t,
1561        alloc: *mut CSTL_Alloc,
1562    ) -> bool;
1563}
1564unsafe extern "C" {
1565    #[doc = " Replaces the characters in the range `[first, last)` with the first `count`\n characters of the string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
1566    pub fn CSTL_wstring_replace_n(
1567        instance: CSTL_WideStringRef,
1568        first: *const wchar_t,
1569        last: *const wchar_t,
1570        ptr: *const wchar_t,
1571        count: usize,
1572        alloc: *mut CSTL_Alloc,
1573    ) -> bool;
1574}
1575unsafe extern "C" {
1576    #[doc = " Replaces the characters in the range `[first, last)` with `count` copies\n of the character `ch`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
1577    pub fn CSTL_wstring_replace_char(
1578        instance: CSTL_WideStringRef,
1579        first: *const wchar_t,
1580        last: *const wchar_t,
1581        count: usize,
1582        ch: wchar_t,
1583        alloc: *mut CSTL_Alloc,
1584    ) -> bool;
1585}
1586unsafe extern "C" {
1587    #[doc = " Replaces the characters in the range `[first, last)` with the string `other`.\n\n If the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
1588    pub fn CSTL_wstring_replace_str(
1589        instance: CSTL_WideStringRef,
1590        first: *const wchar_t,
1591        last: *const wchar_t,
1592        other: CSTL_WideStringCRef,
1593        alloc: *mut CSTL_Alloc,
1594    ) -> bool;
1595}
1596unsafe extern "C" {
1597    #[doc = " Replaces the characters in the range `[first, last)` with the substring\n at offset `other_off` in `other` with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_wstring_size(other)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
1598    pub fn CSTL_wstring_replace_substr(
1599        instance: CSTL_WideStringRef,
1600        first: *const wchar_t,
1601        last: *const wchar_t,
1602        other: CSTL_WideStringCRef,
1603        other_off: usize,
1604        count: usize,
1605        alloc: *mut CSTL_Alloc,
1606    ) -> bool;
1607}
1608unsafe extern "C" {
1609    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the null-terminated string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1610    pub fn CSTL_wstring_replace_at(
1611        instance: CSTL_WideStringRef,
1612        off: usize,
1613        count: usize,
1614        ptr: *const wchar_t,
1615        alloc: *mut CSTL_Alloc,
1616    ) -> bool;
1617}
1618unsafe extern "C" {
1619    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the first `count2` characters of the string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1620    pub fn CSTL_wstring_replace_n_at(
1621        instance: CSTL_WideStringRef,
1622        off: usize,
1623        count: usize,
1624        ptr: *const wchar_t,
1625        count2: usize,
1626        alloc: *mut CSTL_Alloc,
1627    ) -> bool;
1628}
1629unsafe extern "C" {
1630    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with `count` copies of the character `ch`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1631    pub fn CSTL_wstring_replace_char_at(
1632        instance: CSTL_WideStringRef,
1633        off: usize,
1634        count: usize,
1635        count2: usize,
1636        ch: wchar_t,
1637        alloc: *mut CSTL_Alloc,
1638    ) -> bool;
1639}
1640unsafe extern "C" {
1641    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the string `other`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1642    pub fn CSTL_wstring_replace_str_at(
1643        instance: CSTL_WideStringRef,
1644        off: usize,
1645        count: usize,
1646        other: CSTL_WideStringCRef,
1647        alloc: *mut CSTL_Alloc,
1648    ) -> bool;
1649}
1650unsafe extern "C" {
1651    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the substring at offset `other_off` in `other` with the length\n given by `count2`.\n\n If `off` is outside of the range `[instance, instance + CSTL_wstring_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_wstring_size(other)]`\n or if the length of the resulting string is greater than `CSTL_wstring_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
1652    pub fn CSTL_wstring_replace_substr_at(
1653        instance: CSTL_WideStringRef,
1654        off: usize,
1655        count: usize,
1656        other: CSTL_WideStringCRef,
1657        other_off: usize,
1658        count2: usize,
1659        alloc: *mut CSTL_Alloc,
1660    ) -> bool;
1661}
1662unsafe extern "C" {
1663    #[doc = " Copies a substring `[off, off + count)` to character string pointed to by\n `dest`. The resulting character string is not null terminated.\n\n Returns the number of characters copied or `CSTL_string_npos` if\n `off > CSTL_wstring_size(instance)` (out of range).\n"]
1664    pub fn CSTL_wstring_copy(
1665        instance: CSTL_WideStringCRef,
1666        dest: *mut wchar_t,
1667        count: usize,
1668        off: usize,
1669    ) -> usize;
1670}
1671unsafe extern "C" {
1672    #[doc = " Resizes the string to contain `new_size` characters, appending `ch`\n if current size is less than `new_size`.\n\n If `new_size` is greater than `CSTL_wstring_max_size()` this\n function has no effect and returns `false`, otherwise it returns `true`.\n"]
1673    pub fn CSTL_wstring_resize(
1674        instance: CSTL_WideStringRef,
1675        new_size: usize,
1676        ch: wchar_t,
1677        alloc: *mut CSTL_Alloc,
1678    ) -> bool;
1679}
1680unsafe extern "C" {
1681    #[doc = " Find the first from offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1682    pub fn CSTL_wstring_find(
1683        instance: CSTL_WideStringCRef,
1684        ptr: *const wchar_t,
1685        off: usize,
1686    ) -> usize;
1687}
1688unsafe extern "C" {
1689    #[doc = " Find the first from offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1690    pub fn CSTL_wstring_find_n(
1691        instance: CSTL_WideStringCRef,
1692        ptr: *const wchar_t,
1693        off: usize,
1694        count: usize,
1695    ) -> usize;
1696}
1697unsafe extern "C" {
1698    #[doc = " Find the first from offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1699    pub fn CSTL_wstring_find_char(instance: CSTL_WideStringCRef, ch: wchar_t, off: usize) -> usize;
1700}
1701unsafe extern "C" {
1702    #[doc = " Find the first from offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1703    pub fn CSTL_wstring_find_str(
1704        instance: CSTL_WideStringCRef,
1705        other: CSTL_WideStringCRef,
1706        off: usize,
1707    ) -> usize;
1708}
1709unsafe extern "C" {
1710    #[doc = " Find the last before offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1711    pub fn CSTL_wstring_rfind(
1712        instance: CSTL_WideStringCRef,
1713        ptr: *const wchar_t,
1714        off: usize,
1715    ) -> usize;
1716}
1717unsafe extern "C" {
1718    #[doc = " Find the last before offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1719    pub fn CSTL_wstring_rfind_n(
1720        instance: CSTL_WideStringCRef,
1721        ptr: *const wchar_t,
1722        off: usize,
1723        count: usize,
1724    ) -> usize;
1725}
1726unsafe extern "C" {
1727    #[doc = " Find the last before offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1728    pub fn CSTL_wstring_rfind_char(instance: CSTL_WideStringCRef, ch: wchar_t, off: usize)
1729        -> usize;
1730}
1731unsafe extern "C" {
1732    #[doc = " Find the last before offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
1733    pub fn CSTL_wstring_rfind_str(
1734        instance: CSTL_WideStringCRef,
1735        other: CSTL_WideStringCRef,
1736        off: usize,
1737    ) -> usize;
1738}
1739unsafe extern "C" {
1740    #[doc = " Compare two null-terminated character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_WideString` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
1741    pub fn CSTL_wstring_compare(
1742        left: *const wchar_t,
1743        right: *const wchar_t,
1744    ) -> ::std::os::raw::c_int;
1745}
1746unsafe extern "C" {
1747    #[doc = " Compare an explicit length character sequence with a null-terminated one.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n To compare an explicit length `left` and a null-terminated `right`,\n swap them and negate the result: `-CSTL_wstring_compare_n(right, left, left_count)`.\n\n There is no `CSTL_WideString` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
1748    pub fn CSTL_wstring_compare_n(
1749        left: *const wchar_t,
1750        right: *const wchar_t,
1751        right_count: usize,
1752    ) -> ::std::os::raw::c_int;
1753}
1754unsafe extern "C" {
1755    #[doc = " Compare two explicit length character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_WideString` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
1756    pub fn CSTL_wstring_compare_nn(
1757        left: *const wchar_t,
1758        left_count: usize,
1759        right: *const wchar_t,
1760        right_count: usize,
1761    ) -> ::std::os::raw::c_int;
1762}
1763pub type char16_t = ::std::os::raw::c_ushort;
1764pub type char32_t = ::std::os::raw::c_uint;
1765pub type char8_t = ::std::os::raw::c_uchar;
1766#[doc = " STL ABI `std::basic_string` layout.\n\n Does not include the allocator, which nonetheless is a part of the `std::basic_string`\n structure! You are responsible for including it, since it can take on any form.\n\n Do not manipulate the members directly, use the associated functions!\n"]
1767#[repr(C)]
1768pub struct CSTL_UTF8StringVal {
1769    pub bx: CSTL_UTF8StringVal__bindgen_ty_1,
1770    pub size: usize,
1771    pub res: usize,
1772}
1773#[repr(C)]
1774#[derive(Copy, Clone)]
1775pub union CSTL_UTF8StringVal__bindgen_ty_1 {
1776    pub buf: [char8_t; 16usize],
1777    pub ptr: *mut char8_t,
1778}
1779#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1780const _: () = {
1781    ["Size of CSTL_UTF8StringVal__bindgen_ty_1"]
1782        [::std::mem::size_of::<CSTL_UTF8StringVal__bindgen_ty_1>() - 16usize];
1783    ["Alignment of CSTL_UTF8StringVal__bindgen_ty_1"]
1784        [::std::mem::align_of::<CSTL_UTF8StringVal__bindgen_ty_1>() - 8usize];
1785    ["Offset of field: CSTL_UTF8StringVal__bindgen_ty_1::buf"]
1786        [::std::mem::offset_of!(CSTL_UTF8StringVal__bindgen_ty_1, buf) - 0usize];
1787    ["Offset of field: CSTL_UTF8StringVal__bindgen_ty_1::ptr"]
1788        [::std::mem::offset_of!(CSTL_UTF8StringVal__bindgen_ty_1, ptr) - 0usize];
1789};
1790#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1791const _: () = {
1792    ["Size of CSTL_UTF8StringVal"][::std::mem::size_of::<CSTL_UTF8StringVal>() - 32usize];
1793    ["Alignment of CSTL_UTF8StringVal"][::std::mem::align_of::<CSTL_UTF8StringVal>() - 8usize];
1794    ["Offset of field: CSTL_UTF8StringVal::bx"]
1795        [::std::mem::offset_of!(CSTL_UTF8StringVal, bx) - 0usize];
1796    ["Offset of field: CSTL_UTF8StringVal::size"]
1797        [::std::mem::offset_of!(CSTL_UTF8StringVal, size) - 16usize];
1798    ["Offset of field: CSTL_UTF8StringVal::res"]
1799        [::std::mem::offset_of!(CSTL_UTF8StringVal, res) - 24usize];
1800};
1801#[doc = " Reference to a mutable `CSTL_UTF8StringVal`.\n\n Must not be null.\n"]
1802pub type CSTL_UTF8StringRef = *mut CSTL_UTF8StringVal;
1803#[doc = " Reference to a const `CSTL_UTF8StringVal`.\n\n Must not be null.\n"]
1804pub type CSTL_UTF8StringCRef = *const CSTL_UTF8StringVal;
1805unsafe extern "C" {
1806    #[doc = " Initializes the string, but does not allocate any memory.\n\n An initialized string can be trivially destroyed without leaks as long\n as its owned string is small enough to be inline (smaller than CSTL_string_alloc_mask).\n\n Re-initializing a string with a backing memory allocation will leak the old\n memory allocation.\n"]
1807    pub fn CSTL_u8string_construct(new_instance: *mut CSTL_UTF8StringVal);
1808}
1809unsafe extern "C" {
1810    #[doc = " Destroys the string, freeing the backing storage if necessary.\n"]
1811    pub fn CSTL_u8string_destroy(instance: CSTL_UTF8StringRef, alloc: *mut CSTL_Alloc);
1812}
1813unsafe extern "C" {
1814    #[doc = " Initializes the string with the substring at offset `other_off`\n in `other` with the length given by `count`.\n\n If `new_instance == NULL` or if `other_off` is outside of the range\n `[other, other + CSTL_u8string_size(other)]` returns `false` and does nothing,\n otherwise it returns `true`.\n\n If `new_instance == other` the substring operation is performed in-place without\n de-initializing `other`.\n\n Remember that re-initializing a different string with a backing memory allocation\n will leak the old memory allocation.\n"]
1815    pub fn CSTL_u8string_substr(
1816        new_instance: *mut CSTL_UTF8StringVal,
1817        other: CSTL_UTF8StringCRef,
1818        other_off: usize,
1819        count: usize,
1820        alloc: *mut CSTL_Alloc,
1821    ) -> bool;
1822}
1823unsafe extern "C" {
1824    #[doc = " Replaces the contents of `instance` with the null-terminated string at `ptr`.\n\n If the length of the string at `ptr` is greater than `CSTL_u8string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
1825    pub fn CSTL_u8string_assign(
1826        instance: CSTL_UTF8StringRef,
1827        ptr: *const char8_t,
1828        alloc: *mut CSTL_Alloc,
1829    ) -> bool;
1830}
1831unsafe extern "C" {
1832    #[doc = " Replaces the contents of `instance` with the first `count` characters of the string at `ptr`.\n\n If `n` is greater than `CSTL_u8string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
1833    pub fn CSTL_u8string_assign_n(
1834        instance: CSTL_UTF8StringRef,
1835        ptr: *const char8_t,
1836        count: usize,
1837        alloc: *mut CSTL_Alloc,
1838    ) -> bool;
1839}
1840unsafe extern "C" {
1841    #[doc = " Replaces the contents of `instance` with the `count` copies of the character `ch`.\n\n If `count` is greater than `CSTL_u8string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
1842    pub fn CSTL_u8string_assign_char(
1843        instance: CSTL_UTF8StringRef,
1844        count: usize,
1845        ch: char8_t,
1846        alloc: *mut CSTL_Alloc,
1847    ) -> bool;
1848}
1849unsafe extern "C" {
1850    #[doc = " Replaces the contents of `instance` with the substring at offset `other_off` in `other`\n with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_u8string_size(other)]` returns\n `false` and does nothing, otherwise it returns `true`.\n"]
1851    pub fn CSTL_u8string_assign_substr(
1852        instance: CSTL_UTF8StringRef,
1853        other: CSTL_UTF8StringCRef,
1854        other_off: usize,
1855        count: usize,
1856        alloc: *mut CSTL_Alloc,
1857    ) -> bool;
1858}
1859unsafe extern "C" {
1860    #[doc = " Replaces the contents of `instance` with the contents of `other_instance`.\n\n If `propagate_alloc == true && alloc != other_alloc` then storage\n is freed with `alloc` and allocated again with `other_alloc` before contents\n are copied. Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false` `instance` keeps using `alloc` as its allocator,\n potentially reusing its storage.\n\n You are responsible for replacing the allocator outside of `CSTL_UTF8StringVal` if applicable.\n"]
1861    pub fn CSTL_u8string_copy_assign(
1862        instance: CSTL_UTF8StringRef,
1863        alloc: *mut CSTL_Alloc,
1864        other_instance: CSTL_UTF8StringCRef,
1865        other_alloc: *mut CSTL_Alloc,
1866        propagate_alloc: bool,
1867    );
1868}
1869unsafe extern "C" {
1870    #[doc = " Moves the contents of `other_instance` to the contents of `instance`.\n\n If `propagate_alloc == true` storage is replaced with storage of `other_instance`.\n Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false && alloc != other_alloc` then storage is reused\n and individual characters of `other` are moved in. Then, `instance` uses `alloc` as its allocator.\n\n You are responsible for replacing the allocator outside of `CSTL_UTF8StringVal` if applicable.\n"]
1871    pub fn CSTL_u8string_move_assign(
1872        instance: CSTL_UTF8StringRef,
1873        alloc: *mut CSTL_Alloc,
1874        other_instance: CSTL_UTF8StringRef,
1875        other_alloc: *mut CSTL_Alloc,
1876        propagate_alloc: bool,
1877    );
1878}
1879unsafe extern "C" {
1880    #[doc = " Swaps string contents.\n\n You are responsible for swapping the allocators.\n"]
1881    pub fn CSTL_u8string_swap(instance: CSTL_UTF8StringRef, other_instance: CSTL_UTF8StringRef);
1882}
1883unsafe extern "C" {
1884    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_u8string_length(instance)` the behavior is undefined.\n"]
1885    pub fn CSTL_u8string_index(instance: CSTL_UTF8StringRef, pos: usize) -> *mut char8_t;
1886}
1887unsafe extern "C" {
1888    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_u8string_length(instance)` the behavior is undefined.\n"]
1889    pub fn CSTL_u8string_const_index(instance: CSTL_UTF8StringCRef, pos: usize) -> *const char8_t;
1890}
1891unsafe extern "C" {
1892    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_u8string_length(instance)` a null pointer is returned.\n"]
1893    pub fn CSTL_u8string_at(instance: CSTL_UTF8StringRef, pos: usize) -> *mut char8_t;
1894}
1895unsafe extern "C" {
1896    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_u8string_length(instance)` a null pointer is returned.\n"]
1897    pub fn CSTL_u8string_const_at(instance: CSTL_UTF8StringCRef, pos: usize) -> *const char8_t;
1898}
1899unsafe extern "C" {
1900    #[doc = " Returns a pointer to the first character.\n\n If `CSTL_u8string_empty(instance) == true` the behavior is undefined.\n"]
1901    pub fn CSTL_u8string_front(instance: CSTL_UTF8StringRef) -> *mut char8_t;
1902}
1903unsafe extern "C" {
1904    #[doc = " Returns a const pointer to the first character.\n\n If `CSTL_u8string_empty(instance) == true` the behavior is undefined.\n"]
1905    pub fn CSTL_u8string_const_front(instance: CSTL_UTF8StringCRef) -> *const char8_t;
1906}
1907unsafe extern "C" {
1908    #[doc = " Returns a pointer to the last character.\n\n If `CSTL_u8string_empty(instance) == true` the behavior is undefined.\n"]
1909    pub fn CSTL_u8string_back(instance: CSTL_UTF8StringRef) -> *mut char8_t;
1910}
1911unsafe extern "C" {
1912    #[doc = " Returns a const pointer to the last character.\n\n If `CSTL_u8string_empty(instance) == true` the behavior is undefined.\n"]
1913    pub fn CSTL_u8string_const_back(instance: CSTL_UTF8StringCRef) -> *const char8_t;
1914}
1915unsafe extern "C" {
1916    #[doc = " Returns a pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_u8string_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_u8string_data(instance), CSTL_u8string_data(instance) + size]`\n is always valid.\n\n The array may be mutated through the returned pointer excluding\n the past-the-end null terminator.\n"]
1917    pub fn CSTL_u8string_data(instance: CSTL_UTF8StringRef) -> *mut char8_t;
1918}
1919unsafe extern "C" {
1920    #[doc = " Returns a const pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_u8string_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_u8string_c_str(instance), CSTL_u8string_c_str(instance) + size]`\n is always valid.\n"]
1921    pub fn CSTL_u8string_c_str(instance: CSTL_UTF8StringCRef) -> *const char8_t;
1922}
1923unsafe extern "C" {
1924    #[doc = " Returns an iterator (pointer) to the first character of the string.\n\n If `CSTL_u8string_empty(instance) == true` then\n `CSTL_u8string_begin(instance) == CSTL_u8string_end(instance)`.\n"]
1925    pub fn CSTL_u8string_begin(instance: CSTL_UTF8StringRef) -> *mut char8_t;
1926}
1927unsafe extern "C" {
1928    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_u8string_empty(instance) == true` then\n `CSTL_u8string_begin(instance) == CSTL_u8string_end(instance)`.\n"]
1929    pub fn CSTL_u8string_const_begin(instance: CSTL_UTF8StringCRef) -> *const char8_t;
1930}
1931unsafe extern "C" {
1932    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_u8string_empty(instance) == true` then\n `CSTL_u8string_begin(instance) == CSTL_u8string_end(instance)`.\n"]
1933    pub fn CSTL_u8string_end(instance: CSTL_UTF8StringRef) -> *mut char8_t;
1934}
1935unsafe extern "C" {
1936    #[doc = " Returns a const iterator (pointer) past the last character of the string.\n\n If `CSTL_u8string_empty(instance) == true` then\n `CSTL_u8string_const_begin(instance) == CSTL_u8string_const_end(instance)`.\n"]
1937    pub fn CSTL_u8string_const_end(instance: CSTL_UTF8StringCRef) -> *const char8_t;
1938}
1939unsafe extern "C" {
1940    #[doc = " Returns `true` if the string is empty or `false` otherwise.\n"]
1941    pub fn CSTL_u8string_empty(instance: CSTL_UTF8StringCRef) -> bool;
1942}
1943unsafe extern "C" {
1944    #[doc = " Returns the number of characters in the string.\n"]
1945    pub fn CSTL_u8string_size(instance: CSTL_UTF8StringCRef) -> usize;
1946}
1947unsafe extern "C" {
1948    #[doc = " Returns the number of characters in the string.\n"]
1949    pub fn CSTL_u8string_length(instance: CSTL_UTF8StringCRef) -> usize;
1950}
1951unsafe extern "C" {
1952    #[doc = " Returns the total characters capacity of the string.\n"]
1953    pub fn CSTL_u8string_capacity(instance: CSTL_UTF8StringCRef) -> usize;
1954}
1955unsafe extern "C" {
1956    #[doc = " Returns the maximum possible number of characters in the string.\n"]
1957    pub fn CSTL_u8string_max_size() -> usize;
1958}
1959unsafe extern "C" {
1960    #[doc = " If `new_capacity > CSTL_u8string_capacity(instance)`, reallocates and expands\n the underlying array storage.\n\n If `new_capacity` exceeds `CSTL_u8string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
1961    pub fn CSTL_u8string_reserve(
1962        instance: CSTL_UTF8StringRef,
1963        new_capacity: usize,
1964        alloc: *mut CSTL_Alloc,
1965    ) -> bool;
1966}
1967unsafe extern "C" {
1968    #[doc = " Request removal of unused capacity.\n"]
1969    pub fn CSTL_u8string_shrink_to_fit(instance: CSTL_UTF8StringRef, alloc: *mut CSTL_Alloc);
1970}
1971unsafe extern "C" {
1972    #[doc = " Erase all characters from the string without affecting capacity.\n"]
1973    pub fn CSTL_u8string_clear(instance: CSTL_UTF8StringRef);
1974}
1975unsafe extern "C" {
1976    #[doc = " Inserts the null-terminated string at `ptr` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
1977    pub fn CSTL_u8string_insert(
1978        instance: CSTL_UTF8StringRef,
1979        where_: *const char8_t,
1980        ptr: *const char8_t,
1981        alloc: *mut CSTL_Alloc,
1982    ) -> *mut char8_t;
1983}
1984unsafe extern "C" {
1985    #[doc = " Inserts the first `count` characters of the string at `ptr` at the pointer  `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
1986    pub fn CSTL_u8string_insert_n(
1987        instance: CSTL_UTF8StringRef,
1988        where_: *const char8_t,
1989        ptr: *const char8_t,
1990        count: usize,
1991        alloc: *mut CSTL_Alloc,
1992    ) -> *mut char8_t;
1993}
1994unsafe extern "C" {
1995    #[doc = " Inserts `count` copies of the character `ch` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
1996    pub fn CSTL_u8string_insert_char(
1997        instance: CSTL_UTF8StringRef,
1998        where_: *const char8_t,
1999        count: usize,
2000        ch: char8_t,
2001        alloc: *mut CSTL_Alloc,
2002    ) -> *mut char8_t;
2003}
2004unsafe extern "C" {
2005    #[doc = " Inserts the string `other` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
2006    pub fn CSTL_u8string_insert_str(
2007        instance: CSTL_UTF8StringRef,
2008        where_: *const char8_t,
2009        other: CSTL_UTF8StringCRef,
2010        alloc: *mut CSTL_Alloc,
2011    ) -> *mut char8_t;
2012}
2013unsafe extern "C" {
2014    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at the pointer `where` in `instance`.\n\n If `other_off` is outside of the range `[other, other + CSTL_u8string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
2015    pub fn CSTL_u8string_insert_substr(
2016        instance: CSTL_UTF8StringRef,
2017        where_: *const char8_t,
2018        other: CSTL_UTF8StringCRef,
2019        other_off: usize,
2020        count: usize,
2021        alloc: *mut CSTL_Alloc,
2022    ) -> *mut char8_t;
2023}
2024unsafe extern "C" {
2025    #[doc = " Inserts the null-terminated string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2026    pub fn CSTL_u8string_insert_at(
2027        instance: CSTL_UTF8StringRef,
2028        off: usize,
2029        ptr: *const char8_t,
2030        alloc: *mut CSTL_Alloc,
2031    ) -> bool;
2032}
2033unsafe extern "C" {
2034    #[doc = " Inserts the first `count` characters of the string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2035    pub fn CSTL_u8string_insert_n_at(
2036        instance: CSTL_UTF8StringRef,
2037        off: usize,
2038        ptr: *const char8_t,
2039        count: usize,
2040        alloc: *mut CSTL_Alloc,
2041    ) -> bool;
2042}
2043unsafe extern "C" {
2044    #[doc = " Inserts `count` copies of the character `ch` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2045    pub fn CSTL_u8string_insert_char_at(
2046        instance: CSTL_UTF8StringRef,
2047        off: usize,
2048        count: usize,
2049        ch: char8_t,
2050        alloc: *mut CSTL_Alloc,
2051    ) -> bool;
2052}
2053unsafe extern "C" {
2054    #[doc = " Inserts the string `other` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2055    pub fn CSTL_u8string_insert_str_at(
2056        instance: CSTL_UTF8StringRef,
2057        off: usize,
2058        other: CSTL_UTF8StringCRef,
2059        alloc: *mut CSTL_Alloc,
2060    ) -> bool;
2061}
2062unsafe extern "C" {
2063    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_u8string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2064    pub fn CSTL_u8string_insert_substr_at(
2065        instance: CSTL_UTF8StringRef,
2066        off: usize,
2067        other: CSTL_UTF8StringCRef,
2068        other_off: usize,
2069        count: usize,
2070        alloc: *mut CSTL_Alloc,
2071    ) -> bool;
2072}
2073unsafe extern "C" {
2074    #[doc = " Removes the character at `where` and returns a pointer following the\n removed character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
2075    pub fn CSTL_u8string_erase(
2076        instance: CSTL_UTF8StringRef,
2077        where_: *const char8_t,
2078    ) -> *mut char8_t;
2079}
2080unsafe extern "C" {
2081    #[doc = " Removes the characters in the range `[first, last)` and returns a pointer following the\n removed character.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2082    pub fn CSTL_u8string_erase_substr(
2083        instance: CSTL_UTF8StringRef,
2084        first: *const char8_t,
2085        last: *const char8_t,
2086    ) -> *mut char8_t;
2087}
2088unsafe extern "C" {
2089    #[doc = " Removes the character at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2090    pub fn CSTL_u8string_erase_at(instance: CSTL_UTF8StringRef, off: usize) -> bool;
2091}
2092unsafe extern "C" {
2093    #[doc = " Removes the substring at offset `off` in `instance` with the length given by `count`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2094    pub fn CSTL_u8string_erase_substr_at(
2095        instance: CSTL_UTF8StringRef,
2096        off: usize,
2097        count: usize,
2098    ) -> bool;
2099}
2100unsafe extern "C" {
2101    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_u8string_size(instance) == CSTL_u8string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
2102    pub fn CSTL_u8string_push_back(
2103        instance: CSTL_UTF8StringRef,
2104        ch: char8_t,
2105        alloc: *mut CSTL_Alloc,
2106    ) -> bool;
2107}
2108unsafe extern "C" {
2109    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_u8string_size(instance) == CSTL_u8string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
2110    pub fn CSTL_u8string_pop_back(instance: CSTL_UTF8StringRef);
2111}
2112unsafe extern "C" {
2113    #[doc = " Appends the null-terminated string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2114    pub fn CSTL_u8string_append(
2115        instance: CSTL_UTF8StringRef,
2116        ptr: *const char8_t,
2117        alloc: *mut CSTL_Alloc,
2118    ) -> bool;
2119}
2120unsafe extern "C" {
2121    #[doc = " Appends the first `count` characters of the string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2122    pub fn CSTL_u8string_append_n(
2123        instance: CSTL_UTF8StringRef,
2124        ptr: *const char8_t,
2125        count: usize,
2126        alloc: *mut CSTL_Alloc,
2127    ) -> bool;
2128}
2129unsafe extern "C" {
2130    #[doc = " Appends `count` copies of the character `ch` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2131    pub fn CSTL_u8string_append_char(
2132        instance: CSTL_UTF8StringRef,
2133        count: usize,
2134        ch: char8_t,
2135        alloc: *mut CSTL_Alloc,
2136    ) -> bool;
2137}
2138unsafe extern "C" {
2139    #[doc = " Appends the string `other` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2140    pub fn CSTL_u8string_append_str(
2141        instance: CSTL_UTF8StringRef,
2142        other: CSTL_UTF8StringCRef,
2143        alloc: *mut CSTL_Alloc,
2144    ) -> bool;
2145}
2146unsafe extern "C" {
2147    #[doc = " Appends the substring at offset `other_off` in `other` with the length\n given by `count` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2148    pub fn CSTL_u8string_append_substr(
2149        instance: CSTL_UTF8StringRef,
2150        other: CSTL_UTF8StringCRef,
2151        other_off: usize,
2152        count: usize,
2153        alloc: *mut CSTL_Alloc,
2154    ) -> bool;
2155}
2156unsafe extern "C" {
2157    #[doc = " Replaces the characters in the range `[first, last)` with the null-terminated\n string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2158    pub fn CSTL_u8string_replace(
2159        instance: CSTL_UTF8StringRef,
2160        first: *const char8_t,
2161        last: *const char8_t,
2162        ptr: *const char8_t,
2163        alloc: *mut CSTL_Alloc,
2164    ) -> bool;
2165}
2166unsafe extern "C" {
2167    #[doc = " Replaces the characters in the range `[first, last)` with the first `count`\n characters of the string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2168    pub fn CSTL_u8string_replace_n(
2169        instance: CSTL_UTF8StringRef,
2170        first: *const char8_t,
2171        last: *const char8_t,
2172        ptr: *const char8_t,
2173        count: usize,
2174        alloc: *mut CSTL_Alloc,
2175    ) -> bool;
2176}
2177unsafe extern "C" {
2178    #[doc = " Replaces the characters in the range `[first, last)` with `count` copies\n of the character `ch`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2179    pub fn CSTL_u8string_replace_char(
2180        instance: CSTL_UTF8StringRef,
2181        first: *const char8_t,
2182        last: *const char8_t,
2183        count: usize,
2184        ch: char8_t,
2185        alloc: *mut CSTL_Alloc,
2186    ) -> bool;
2187}
2188unsafe extern "C" {
2189    #[doc = " Replaces the characters in the range `[first, last)` with the string `other`.\n\n If the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2190    pub fn CSTL_u8string_replace_str(
2191        instance: CSTL_UTF8StringRef,
2192        first: *const char8_t,
2193        last: *const char8_t,
2194        other: CSTL_UTF8StringCRef,
2195        alloc: *mut CSTL_Alloc,
2196    ) -> bool;
2197}
2198unsafe extern "C" {
2199    #[doc = " Replaces the characters in the range `[first, last)` with the substring\n at offset `other_off` in `other` with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_u8string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2200    pub fn CSTL_u8string_replace_substr(
2201        instance: CSTL_UTF8StringRef,
2202        first: *const char8_t,
2203        last: *const char8_t,
2204        other: CSTL_UTF8StringCRef,
2205        other_off: usize,
2206        count: usize,
2207        alloc: *mut CSTL_Alloc,
2208    ) -> bool;
2209}
2210unsafe extern "C" {
2211    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the null-terminated string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2212    pub fn CSTL_u8string_replace_at(
2213        instance: CSTL_UTF8StringRef,
2214        off: usize,
2215        count: usize,
2216        ptr: *const char8_t,
2217        alloc: *mut CSTL_Alloc,
2218    ) -> bool;
2219}
2220unsafe extern "C" {
2221    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the first `count2` characters of the string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2222    pub fn CSTL_u8string_replace_n_at(
2223        instance: CSTL_UTF8StringRef,
2224        off: usize,
2225        count: usize,
2226        ptr: *const char8_t,
2227        count2: usize,
2228        alloc: *mut CSTL_Alloc,
2229    ) -> bool;
2230}
2231unsafe extern "C" {
2232    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with `count` copies of the character `ch`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2233    pub fn CSTL_u8string_replace_char_at(
2234        instance: CSTL_UTF8StringRef,
2235        off: usize,
2236        count: usize,
2237        count2: usize,
2238        ch: char8_t,
2239        alloc: *mut CSTL_Alloc,
2240    ) -> bool;
2241}
2242unsafe extern "C" {
2243    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the string `other`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2244    pub fn CSTL_u8string_replace_str_at(
2245        instance: CSTL_UTF8StringRef,
2246        off: usize,
2247        count: usize,
2248        other: CSTL_UTF8StringCRef,
2249        alloc: *mut CSTL_Alloc,
2250    ) -> bool;
2251}
2252unsafe extern "C" {
2253    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the substring at offset `other_off` in `other` with the length\n given by `count2`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u8string_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_u8string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u8string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2254    pub fn CSTL_u8string_replace_substr_at(
2255        instance: CSTL_UTF8StringRef,
2256        off: usize,
2257        count: usize,
2258        other: CSTL_UTF8StringCRef,
2259        other_off: usize,
2260        count2: usize,
2261        alloc: *mut CSTL_Alloc,
2262    ) -> bool;
2263}
2264unsafe extern "C" {
2265    #[doc = " Copies a substring `[off, off + count)` to character string pointed to by\n `dest`. The resulting character string is not null terminated.\n\n Returns the number of characters copied or `CSTL_string_npos` if\n `off > CSTL_u8string_size(instance)` (out of range).\n"]
2266    pub fn CSTL_u8string_copy(
2267        instance: CSTL_UTF8StringCRef,
2268        dest: *mut char8_t,
2269        count: usize,
2270        off: usize,
2271    ) -> usize;
2272}
2273unsafe extern "C" {
2274    #[doc = " Resizes the string to contain `new_size` characters, appending `ch`\n if current size is less than `new_size`.\n\n If `new_size` is greater than `CSTL_u8string_max_size()` this\n function has no effect and returns `false`, otherwise it returns `true`.\n"]
2275    pub fn CSTL_u8string_resize(
2276        instance: CSTL_UTF8StringRef,
2277        new_size: usize,
2278        ch: char8_t,
2279        alloc: *mut CSTL_Alloc,
2280    ) -> bool;
2281}
2282unsafe extern "C" {
2283    #[doc = " Find the first from offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2284    pub fn CSTL_u8string_find(
2285        instance: CSTL_UTF8StringCRef,
2286        ptr: *const char8_t,
2287        off: usize,
2288    ) -> usize;
2289}
2290unsafe extern "C" {
2291    #[doc = " Find the first from offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2292    pub fn CSTL_u8string_find_n(
2293        instance: CSTL_UTF8StringCRef,
2294        ptr: *const char8_t,
2295        off: usize,
2296        count: usize,
2297    ) -> usize;
2298}
2299unsafe extern "C" {
2300    #[doc = " Find the first from offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2301    pub fn CSTL_u8string_find_char(instance: CSTL_UTF8StringCRef, ch: char8_t, off: usize)
2302        -> usize;
2303}
2304unsafe extern "C" {
2305    #[doc = " Find the first from offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2306    pub fn CSTL_u8string_find_str(
2307        instance: CSTL_UTF8StringCRef,
2308        other: CSTL_UTF8StringCRef,
2309        off: usize,
2310    ) -> usize;
2311}
2312unsafe extern "C" {
2313    #[doc = " Find the last before offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2314    pub fn CSTL_u8string_rfind(
2315        instance: CSTL_UTF8StringCRef,
2316        ptr: *const char8_t,
2317        off: usize,
2318    ) -> usize;
2319}
2320unsafe extern "C" {
2321    #[doc = " Find the last before offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2322    pub fn CSTL_u8string_rfind_n(
2323        instance: CSTL_UTF8StringCRef,
2324        ptr: *const char8_t,
2325        off: usize,
2326        count: usize,
2327    ) -> usize;
2328}
2329unsafe extern "C" {
2330    #[doc = " Find the last before offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2331    pub fn CSTL_u8string_rfind_char(
2332        instance: CSTL_UTF8StringCRef,
2333        ch: char8_t,
2334        off: usize,
2335    ) -> usize;
2336}
2337unsafe extern "C" {
2338    #[doc = " Find the last before offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2339    pub fn CSTL_u8string_rfind_str(
2340        instance: CSTL_UTF8StringCRef,
2341        other: CSTL_UTF8StringCRef,
2342        off: usize,
2343    ) -> usize;
2344}
2345unsafe extern "C" {
2346    #[doc = " Compare two null-terminated character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_UTF8String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
2347    pub fn CSTL_u8string_compare(
2348        left: *const char8_t,
2349        right: *const char8_t,
2350    ) -> ::std::os::raw::c_int;
2351}
2352unsafe extern "C" {
2353    #[doc = " Compare an explicit length character sequence with a null-terminated one.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n To compare an explicit length `left` and a null-terminated `right`,\n swap them and negate the result: `-CSTL_u8string_compare_n(right, left, left_count)`.\n\n There is no `CSTL_UTF8String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
2354    pub fn CSTL_u8string_compare_n(
2355        left: *const char8_t,
2356        right: *const char8_t,
2357        right_count: usize,
2358    ) -> ::std::os::raw::c_int;
2359}
2360unsafe extern "C" {
2361    #[doc = " Compare two explicit length character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_UTF8String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
2362    pub fn CSTL_u8string_compare_nn(
2363        left: *const char8_t,
2364        left_count: usize,
2365        right: *const char8_t,
2366        right_count: usize,
2367    ) -> ::std::os::raw::c_int;
2368}
2369#[doc = " STL ABI `std::basic_string` layout.\n\n Does not include the allocator, which nonetheless is a part of the `std::basic_string`\n structure! You are responsible for including it, since it can take on any form.\n\n Do not manipulate the members directly, use the associated functions!\n"]
2370#[repr(C)]
2371pub struct CSTL_UTF16StringVal {
2372    pub bx: CSTL_UTF16StringVal__bindgen_ty_1,
2373    pub size: usize,
2374    pub res: usize,
2375}
2376#[repr(C)]
2377#[derive(Copy, Clone)]
2378pub union CSTL_UTF16StringVal__bindgen_ty_1 {
2379    pub buf: [char16_t; 8usize],
2380    pub ptr: *mut char16_t,
2381}
2382#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2383const _: () = {
2384    ["Size of CSTL_UTF16StringVal__bindgen_ty_1"]
2385        [::std::mem::size_of::<CSTL_UTF16StringVal__bindgen_ty_1>() - 16usize];
2386    ["Alignment of CSTL_UTF16StringVal__bindgen_ty_1"]
2387        [::std::mem::align_of::<CSTL_UTF16StringVal__bindgen_ty_1>() - 8usize];
2388    ["Offset of field: CSTL_UTF16StringVal__bindgen_ty_1::buf"]
2389        [::std::mem::offset_of!(CSTL_UTF16StringVal__bindgen_ty_1, buf) - 0usize];
2390    ["Offset of field: CSTL_UTF16StringVal__bindgen_ty_1::ptr"]
2391        [::std::mem::offset_of!(CSTL_UTF16StringVal__bindgen_ty_1, ptr) - 0usize];
2392};
2393#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2394const _: () = {
2395    ["Size of CSTL_UTF16StringVal"][::std::mem::size_of::<CSTL_UTF16StringVal>() - 32usize];
2396    ["Alignment of CSTL_UTF16StringVal"][::std::mem::align_of::<CSTL_UTF16StringVal>() - 8usize];
2397    ["Offset of field: CSTL_UTF16StringVal::bx"]
2398        [::std::mem::offset_of!(CSTL_UTF16StringVal, bx) - 0usize];
2399    ["Offset of field: CSTL_UTF16StringVal::size"]
2400        [::std::mem::offset_of!(CSTL_UTF16StringVal, size) - 16usize];
2401    ["Offset of field: CSTL_UTF16StringVal::res"]
2402        [::std::mem::offset_of!(CSTL_UTF16StringVal, res) - 24usize];
2403};
2404#[doc = " Reference to a mutable `CSTL_UTF16StringVal`.\n\n Must not be null.\n"]
2405pub type CSTL_UTF16StringRef = *mut CSTL_UTF16StringVal;
2406#[doc = " Reference to a const `CSTL_UTF16StringVal`.\n\n Must not be null.\n"]
2407pub type CSTL_UTF16StringCRef = *const CSTL_UTF16StringVal;
2408unsafe extern "C" {
2409    #[doc = " Initializes the string, but does not allocate any memory.\n\n An initialized string can be trivially destroyed without leaks as long\n as its owned string is small enough to be inline (smaller than CSTL_string_alloc_mask).\n\n Re-initializing a string with a backing memory allocation will leak the old\n memory allocation.\n"]
2410    pub fn CSTL_u16string_construct(new_instance: *mut CSTL_UTF16StringVal);
2411}
2412unsafe extern "C" {
2413    #[doc = " Destroys the string, freeing the backing storage if necessary.\n"]
2414    pub fn CSTL_u16string_destroy(instance: CSTL_UTF16StringRef, alloc: *mut CSTL_Alloc);
2415}
2416unsafe extern "C" {
2417    #[doc = " Initializes the string with the substring at offset `other_off`\n in `other` with the length given by `count`.\n\n If `new_instance == NULL` or if `other_off` is outside of the range\n `[other, other + CSTL_u16string_size(other)]` returns `false` and does nothing,\n otherwise it returns `true`.\n\n If `new_instance == other` the substring operation is performed in-place without\n de-initializing `other`.\n\n Remember that re-initializing a different string with a backing memory allocation\n will leak the old memory allocation.\n"]
2418    pub fn CSTL_u16string_substr(
2419        new_instance: *mut CSTL_UTF16StringVal,
2420        other: CSTL_UTF16StringCRef,
2421        other_off: usize,
2422        count: usize,
2423        alloc: *mut CSTL_Alloc,
2424    ) -> bool;
2425}
2426unsafe extern "C" {
2427    #[doc = " Replaces the contents of `instance` with the null-terminated string at `ptr`.\n\n If the length of the string at `ptr` is greater than `CSTL_u16string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
2428    pub fn CSTL_u16string_assign(
2429        instance: CSTL_UTF16StringRef,
2430        ptr: *const char16_t,
2431        alloc: *mut CSTL_Alloc,
2432    ) -> bool;
2433}
2434unsafe extern "C" {
2435    #[doc = " Replaces the contents of `instance` with the first `count` characters of the string at `ptr`.\n\n If `n` is greater than `CSTL_u16string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
2436    pub fn CSTL_u16string_assign_n(
2437        instance: CSTL_UTF16StringRef,
2438        ptr: *const char16_t,
2439        count: usize,
2440        alloc: *mut CSTL_Alloc,
2441    ) -> bool;
2442}
2443unsafe extern "C" {
2444    #[doc = " Replaces the contents of `instance` with the `count` copies of the character `ch`.\n\n If `count` is greater than `CSTL_u16string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
2445    pub fn CSTL_u16string_assign_char(
2446        instance: CSTL_UTF16StringRef,
2447        count: usize,
2448        ch: char16_t,
2449        alloc: *mut CSTL_Alloc,
2450    ) -> bool;
2451}
2452unsafe extern "C" {
2453    #[doc = " Replaces the contents of `instance` with the substring at offset `other_off` in `other`\n with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_u16string_size(other)]` returns\n `false` and does nothing, otherwise it returns `true`.\n"]
2454    pub fn CSTL_u16string_assign_substr(
2455        instance: CSTL_UTF16StringRef,
2456        other: CSTL_UTF16StringCRef,
2457        other_off: usize,
2458        count: usize,
2459        alloc: *mut CSTL_Alloc,
2460    ) -> bool;
2461}
2462unsafe extern "C" {
2463    #[doc = " Replaces the contents of `instance` with the contents of `other_instance`.\n\n If `propagate_alloc == true && alloc != other_alloc` then storage\n is freed with `alloc` and allocated again with `other_alloc` before contents\n are copied. Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false` `instance` keeps using `alloc` as its allocator,\n potentially reusing its storage.\n\n You are responsible for replacing the allocator outside of `CSTL_UTF16StringVal` if applicable.\n"]
2464    pub fn CSTL_u16string_copy_assign(
2465        instance: CSTL_UTF16StringRef,
2466        alloc: *mut CSTL_Alloc,
2467        other_instance: CSTL_UTF16StringCRef,
2468        other_alloc: *mut CSTL_Alloc,
2469        propagate_alloc: bool,
2470    );
2471}
2472unsafe extern "C" {
2473    #[doc = " Moves the contents of `other_instance` to the contents of `instance`.\n\n If `propagate_alloc == true` storage is replaced with storage of `other_instance`.\n Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false && alloc != other_alloc` then storage is reused\n and individual characters of `other` are moved in. Then, `instance` uses `alloc` as its allocator.\n\n You are responsible for replacing the allocator outside of `CSTL_UTF16StringVal` if applicable.\n"]
2474    pub fn CSTL_u16string_move_assign(
2475        instance: CSTL_UTF16StringRef,
2476        alloc: *mut CSTL_Alloc,
2477        other_instance: CSTL_UTF16StringRef,
2478        other_alloc: *mut CSTL_Alloc,
2479        propagate_alloc: bool,
2480    );
2481}
2482unsafe extern "C" {
2483    #[doc = " Swaps string contents.\n\n You are responsible for swapping the allocators.\n"]
2484    pub fn CSTL_u16string_swap(instance: CSTL_UTF16StringRef, other_instance: CSTL_UTF16StringRef);
2485}
2486unsafe extern "C" {
2487    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_u16string_length(instance)` the behavior is undefined.\n"]
2488    pub fn CSTL_u16string_index(instance: CSTL_UTF16StringRef, pos: usize) -> *mut char16_t;
2489}
2490unsafe extern "C" {
2491    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_u16string_length(instance)` the behavior is undefined.\n"]
2492    pub fn CSTL_u16string_const_index(
2493        instance: CSTL_UTF16StringCRef,
2494        pos: usize,
2495    ) -> *const char16_t;
2496}
2497unsafe extern "C" {
2498    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_u16string_length(instance)` a null pointer is returned.\n"]
2499    pub fn CSTL_u16string_at(instance: CSTL_UTF16StringRef, pos: usize) -> *mut char16_t;
2500}
2501unsafe extern "C" {
2502    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_u16string_length(instance)` a null pointer is returned.\n"]
2503    pub fn CSTL_u16string_const_at(instance: CSTL_UTF16StringCRef, pos: usize) -> *const char16_t;
2504}
2505unsafe extern "C" {
2506    #[doc = " Returns a pointer to the first character.\n\n If `CSTL_u16string_empty(instance) == true` the behavior is undefined.\n"]
2507    pub fn CSTL_u16string_front(instance: CSTL_UTF16StringRef) -> *mut char16_t;
2508}
2509unsafe extern "C" {
2510    #[doc = " Returns a const pointer to the first character.\n\n If `CSTL_u16string_empty(instance) == true` the behavior is undefined.\n"]
2511    pub fn CSTL_u16string_const_front(instance: CSTL_UTF16StringCRef) -> *const char16_t;
2512}
2513unsafe extern "C" {
2514    #[doc = " Returns a pointer to the last character.\n\n If `CSTL_u16string_empty(instance) == true` the behavior is undefined.\n"]
2515    pub fn CSTL_u16string_back(instance: CSTL_UTF16StringRef) -> *mut char16_t;
2516}
2517unsafe extern "C" {
2518    #[doc = " Returns a const pointer to the last character.\n\n If `CSTL_u16string_empty(instance) == true` the behavior is undefined.\n"]
2519    pub fn CSTL_u16string_const_back(instance: CSTL_UTF16StringCRef) -> *const char16_t;
2520}
2521unsafe extern "C" {
2522    #[doc = " Returns a pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_u16string_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_u16string_data(instance), CSTL_u16string_data(instance) + size]`\n is always valid.\n\n The array may be mutated through the returned pointer excluding\n the past-the-end null terminator.\n"]
2523    pub fn CSTL_u16string_data(instance: CSTL_UTF16StringRef) -> *mut char16_t;
2524}
2525unsafe extern "C" {
2526    #[doc = " Returns a const pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_u16string_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_u16string_c_str(instance), CSTL_u16string_c_str(instance) + size]`\n is always valid.\n"]
2527    pub fn CSTL_u16string_c_str(instance: CSTL_UTF16StringCRef) -> *const char16_t;
2528}
2529unsafe extern "C" {
2530    #[doc = " Returns an iterator (pointer) to the first character of the string.\n\n If `CSTL_u16string_empty(instance) == true` then\n `CSTL_u16string_begin(instance) == CSTL_u16string_end(instance)`.\n"]
2531    pub fn CSTL_u16string_begin(instance: CSTL_UTF16StringRef) -> *mut char16_t;
2532}
2533unsafe extern "C" {
2534    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_u16string_empty(instance) == true` then\n `CSTL_u16string_begin(instance) == CSTL_u16string_end(instance)`.\n"]
2535    pub fn CSTL_u16string_const_begin(instance: CSTL_UTF16StringCRef) -> *const char16_t;
2536}
2537unsafe extern "C" {
2538    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_u16string_empty(instance) == true` then\n `CSTL_u16string_begin(instance) == CSTL_u16string_end(instance)`.\n"]
2539    pub fn CSTL_u16string_end(instance: CSTL_UTF16StringRef) -> *mut char16_t;
2540}
2541unsafe extern "C" {
2542    #[doc = " Returns a const iterator (pointer) past the last character of the string.\n\n If `CSTL_u16string_empty(instance) == true` then\n `CSTL_u16string_const_begin(instance) == CSTL_u16string_const_end(instance)`.\n"]
2543    pub fn CSTL_u16string_const_end(instance: CSTL_UTF16StringCRef) -> *const char16_t;
2544}
2545unsafe extern "C" {
2546    #[doc = " Returns `true` if the string is empty or `false` otherwise.\n"]
2547    pub fn CSTL_u16string_empty(instance: CSTL_UTF16StringCRef) -> bool;
2548}
2549unsafe extern "C" {
2550    #[doc = " Returns the number of characters in the string.\n"]
2551    pub fn CSTL_u16string_size(instance: CSTL_UTF16StringCRef) -> usize;
2552}
2553unsafe extern "C" {
2554    #[doc = " Returns the number of characters in the string.\n"]
2555    pub fn CSTL_u16string_length(instance: CSTL_UTF16StringCRef) -> usize;
2556}
2557unsafe extern "C" {
2558    #[doc = " Returns the total characters capacity of the string.\n"]
2559    pub fn CSTL_u16string_capacity(instance: CSTL_UTF16StringCRef) -> usize;
2560}
2561unsafe extern "C" {
2562    #[doc = " Returns the maximum possible number of characters in the string.\n"]
2563    pub fn CSTL_u16string_max_size() -> usize;
2564}
2565unsafe extern "C" {
2566    #[doc = " If `new_capacity > CSTL_u16string_capacity(instance)`, reallocates and expands\n the underlying array storage.\n\n If `new_capacity` exceeds `CSTL_u16string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
2567    pub fn CSTL_u16string_reserve(
2568        instance: CSTL_UTF16StringRef,
2569        new_capacity: usize,
2570        alloc: *mut CSTL_Alloc,
2571    ) -> bool;
2572}
2573unsafe extern "C" {
2574    #[doc = " Request removal of unused capacity.\n"]
2575    pub fn CSTL_u16string_shrink_to_fit(instance: CSTL_UTF16StringRef, alloc: *mut CSTL_Alloc);
2576}
2577unsafe extern "C" {
2578    #[doc = " Erase all characters from the string without affecting capacity.\n"]
2579    pub fn CSTL_u16string_clear(instance: CSTL_UTF16StringRef);
2580}
2581unsafe extern "C" {
2582    #[doc = " Inserts the null-terminated string at `ptr` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
2583    pub fn CSTL_u16string_insert(
2584        instance: CSTL_UTF16StringRef,
2585        where_: *const char16_t,
2586        ptr: *const char16_t,
2587        alloc: *mut CSTL_Alloc,
2588    ) -> *mut char16_t;
2589}
2590unsafe extern "C" {
2591    #[doc = " Inserts the first `count` characters of the string at `ptr` at the pointer  `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
2592    pub fn CSTL_u16string_insert_n(
2593        instance: CSTL_UTF16StringRef,
2594        where_: *const char16_t,
2595        ptr: *const char16_t,
2596        count: usize,
2597        alloc: *mut CSTL_Alloc,
2598    ) -> *mut char16_t;
2599}
2600unsafe extern "C" {
2601    #[doc = " Inserts `count` copies of the character `ch` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
2602    pub fn CSTL_u16string_insert_char(
2603        instance: CSTL_UTF16StringRef,
2604        where_: *const char16_t,
2605        count: usize,
2606        ch: char16_t,
2607        alloc: *mut CSTL_Alloc,
2608    ) -> *mut char16_t;
2609}
2610unsafe extern "C" {
2611    #[doc = " Inserts the string `other` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
2612    pub fn CSTL_u16string_insert_str(
2613        instance: CSTL_UTF16StringRef,
2614        where_: *const char16_t,
2615        other: CSTL_UTF16StringCRef,
2616        alloc: *mut CSTL_Alloc,
2617    ) -> *mut char16_t;
2618}
2619unsafe extern "C" {
2620    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at the pointer `where` in `instance`.\n\n If `other_off` is outside of the range `[other, other + CSTL_u16string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
2621    pub fn CSTL_u16string_insert_substr(
2622        instance: CSTL_UTF16StringRef,
2623        where_: *const char16_t,
2624        other: CSTL_UTF16StringCRef,
2625        other_off: usize,
2626        count: usize,
2627        alloc: *mut CSTL_Alloc,
2628    ) -> *mut char16_t;
2629}
2630unsafe extern "C" {
2631    #[doc = " Inserts the null-terminated string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2632    pub fn CSTL_u16string_insert_at(
2633        instance: CSTL_UTF16StringRef,
2634        off: usize,
2635        ptr: *const char16_t,
2636        alloc: *mut CSTL_Alloc,
2637    ) -> bool;
2638}
2639unsafe extern "C" {
2640    #[doc = " Inserts the first `count` characters of the string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2641    pub fn CSTL_u16string_insert_n_at(
2642        instance: CSTL_UTF16StringRef,
2643        off: usize,
2644        ptr: *const char16_t,
2645        count: usize,
2646        alloc: *mut CSTL_Alloc,
2647    ) -> bool;
2648}
2649unsafe extern "C" {
2650    #[doc = " Inserts `count` copies of the character `ch` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2651    pub fn CSTL_u16string_insert_char_at(
2652        instance: CSTL_UTF16StringRef,
2653        off: usize,
2654        count: usize,
2655        ch: char16_t,
2656        alloc: *mut CSTL_Alloc,
2657    ) -> bool;
2658}
2659unsafe extern "C" {
2660    #[doc = " Inserts the string `other` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2661    pub fn CSTL_u16string_insert_str_at(
2662        instance: CSTL_UTF16StringRef,
2663        off: usize,
2664        other: CSTL_UTF16StringCRef,
2665        alloc: *mut CSTL_Alloc,
2666    ) -> bool;
2667}
2668unsafe extern "C" {
2669    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_u16string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2670    pub fn CSTL_u16string_insert_substr_at(
2671        instance: CSTL_UTF16StringRef,
2672        off: usize,
2673        other: CSTL_UTF16StringCRef,
2674        other_off: usize,
2675        count: usize,
2676        alloc: *mut CSTL_Alloc,
2677    ) -> bool;
2678}
2679unsafe extern "C" {
2680    #[doc = " Removes the character at `where` and returns a pointer following the\n removed character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
2681    pub fn CSTL_u16string_erase(
2682        instance: CSTL_UTF16StringRef,
2683        where_: *const char16_t,
2684    ) -> *mut char16_t;
2685}
2686unsafe extern "C" {
2687    #[doc = " Removes the characters in the range `[first, last)` and returns a pointer following the\n removed character.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2688    pub fn CSTL_u16string_erase_substr(
2689        instance: CSTL_UTF16StringRef,
2690        first: *const char16_t,
2691        last: *const char16_t,
2692    ) -> *mut char16_t;
2693}
2694unsafe extern "C" {
2695    #[doc = " Removes the character at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2696    pub fn CSTL_u16string_erase_at(instance: CSTL_UTF16StringRef, off: usize) -> bool;
2697}
2698unsafe extern "C" {
2699    #[doc = " Removes the substring at offset `off` in `instance` with the length given by `count`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2700    pub fn CSTL_u16string_erase_substr_at(
2701        instance: CSTL_UTF16StringRef,
2702        off: usize,
2703        count: usize,
2704    ) -> bool;
2705}
2706unsafe extern "C" {
2707    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_u16string_size(instance) == CSTL_u16string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
2708    pub fn CSTL_u16string_push_back(
2709        instance: CSTL_UTF16StringRef,
2710        ch: char16_t,
2711        alloc: *mut CSTL_Alloc,
2712    ) -> bool;
2713}
2714unsafe extern "C" {
2715    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_u16string_size(instance) == CSTL_u16string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
2716    pub fn CSTL_u16string_pop_back(instance: CSTL_UTF16StringRef);
2717}
2718unsafe extern "C" {
2719    #[doc = " Appends the null-terminated string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2720    pub fn CSTL_u16string_append(
2721        instance: CSTL_UTF16StringRef,
2722        ptr: *const char16_t,
2723        alloc: *mut CSTL_Alloc,
2724    ) -> bool;
2725}
2726unsafe extern "C" {
2727    #[doc = " Appends the first `count` characters of the string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2728    pub fn CSTL_u16string_append_n(
2729        instance: CSTL_UTF16StringRef,
2730        ptr: *const char16_t,
2731        count: usize,
2732        alloc: *mut CSTL_Alloc,
2733    ) -> bool;
2734}
2735unsafe extern "C" {
2736    #[doc = " Appends `count` copies of the character `ch` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2737    pub fn CSTL_u16string_append_char(
2738        instance: CSTL_UTF16StringRef,
2739        count: usize,
2740        ch: char16_t,
2741        alloc: *mut CSTL_Alloc,
2742    ) -> bool;
2743}
2744unsafe extern "C" {
2745    #[doc = " Appends the string `other` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2746    pub fn CSTL_u16string_append_str(
2747        instance: CSTL_UTF16StringRef,
2748        other: CSTL_UTF16StringCRef,
2749        alloc: *mut CSTL_Alloc,
2750    ) -> bool;
2751}
2752unsafe extern "C" {
2753    #[doc = " Appends the substring at offset `other_off` in `other` with the length\n given by `count` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2754    pub fn CSTL_u16string_append_substr(
2755        instance: CSTL_UTF16StringRef,
2756        other: CSTL_UTF16StringCRef,
2757        other_off: usize,
2758        count: usize,
2759        alloc: *mut CSTL_Alloc,
2760    ) -> bool;
2761}
2762unsafe extern "C" {
2763    #[doc = " Replaces the characters in the range `[first, last)` with the null-terminated\n string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2764    pub fn CSTL_u16string_replace(
2765        instance: CSTL_UTF16StringRef,
2766        first: *const char16_t,
2767        last: *const char16_t,
2768        ptr: *const char16_t,
2769        alloc: *mut CSTL_Alloc,
2770    ) -> bool;
2771}
2772unsafe extern "C" {
2773    #[doc = " Replaces the characters in the range `[first, last)` with the first `count`\n characters of the string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2774    pub fn CSTL_u16string_replace_n(
2775        instance: CSTL_UTF16StringRef,
2776        first: *const char16_t,
2777        last: *const char16_t,
2778        ptr: *const char16_t,
2779        count: usize,
2780        alloc: *mut CSTL_Alloc,
2781    ) -> bool;
2782}
2783unsafe extern "C" {
2784    #[doc = " Replaces the characters in the range `[first, last)` with `count` copies\n of the character `ch`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2785    pub fn CSTL_u16string_replace_char(
2786        instance: CSTL_UTF16StringRef,
2787        first: *const char16_t,
2788        last: *const char16_t,
2789        count: usize,
2790        ch: char16_t,
2791        alloc: *mut CSTL_Alloc,
2792    ) -> bool;
2793}
2794unsafe extern "C" {
2795    #[doc = " Replaces the characters in the range `[first, last)` with the string `other`.\n\n If the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2796    pub fn CSTL_u16string_replace_str(
2797        instance: CSTL_UTF16StringRef,
2798        first: *const char16_t,
2799        last: *const char16_t,
2800        other: CSTL_UTF16StringCRef,
2801        alloc: *mut CSTL_Alloc,
2802    ) -> bool;
2803}
2804unsafe extern "C" {
2805    #[doc = " Replaces the characters in the range `[first, last)` with the substring\n at offset `other_off` in `other` with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_u16string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
2806    pub fn CSTL_u16string_replace_substr(
2807        instance: CSTL_UTF16StringRef,
2808        first: *const char16_t,
2809        last: *const char16_t,
2810        other: CSTL_UTF16StringCRef,
2811        other_off: usize,
2812        count: usize,
2813        alloc: *mut CSTL_Alloc,
2814    ) -> bool;
2815}
2816unsafe extern "C" {
2817    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the null-terminated string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2818    pub fn CSTL_u16string_replace_at(
2819        instance: CSTL_UTF16StringRef,
2820        off: usize,
2821        count: usize,
2822        ptr: *const char16_t,
2823        alloc: *mut CSTL_Alloc,
2824    ) -> bool;
2825}
2826unsafe extern "C" {
2827    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the first `count2` characters of the string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2828    pub fn CSTL_u16string_replace_n_at(
2829        instance: CSTL_UTF16StringRef,
2830        off: usize,
2831        count: usize,
2832        ptr: *const char16_t,
2833        count2: usize,
2834        alloc: *mut CSTL_Alloc,
2835    ) -> bool;
2836}
2837unsafe extern "C" {
2838    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with `count` copies of the character `ch`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2839    pub fn CSTL_u16string_replace_char_at(
2840        instance: CSTL_UTF16StringRef,
2841        off: usize,
2842        count: usize,
2843        count2: usize,
2844        ch: char16_t,
2845        alloc: *mut CSTL_Alloc,
2846    ) -> bool;
2847}
2848unsafe extern "C" {
2849    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the string `other`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2850    pub fn CSTL_u16string_replace_str_at(
2851        instance: CSTL_UTF16StringRef,
2852        off: usize,
2853        count: usize,
2854        other: CSTL_UTF16StringCRef,
2855        alloc: *mut CSTL_Alloc,
2856    ) -> bool;
2857}
2858unsafe extern "C" {
2859    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the substring at offset `other_off` in `other` with the length\n given by `count2`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u16string_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_u16string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u16string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
2860    pub fn CSTL_u16string_replace_substr_at(
2861        instance: CSTL_UTF16StringRef,
2862        off: usize,
2863        count: usize,
2864        other: CSTL_UTF16StringCRef,
2865        other_off: usize,
2866        count2: usize,
2867        alloc: *mut CSTL_Alloc,
2868    ) -> bool;
2869}
2870unsafe extern "C" {
2871    #[doc = " Copies a substring `[off, off + count)` to character string pointed to by\n `dest`. The resulting character string is not null terminated.\n\n Returns the number of characters copied or `CSTL_string_npos` if\n `off > CSTL_u16string_size(instance)` (out of range).\n"]
2872    pub fn CSTL_u16string_copy(
2873        instance: CSTL_UTF16StringCRef,
2874        dest: *mut char16_t,
2875        count: usize,
2876        off: usize,
2877    ) -> usize;
2878}
2879unsafe extern "C" {
2880    #[doc = " Resizes the string to contain `new_size` characters, appending `ch`\n if current size is less than `new_size`.\n\n If `new_size` is greater than `CSTL_u16string_max_size()` this\n function has no effect and returns `false`, otherwise it returns `true`.\n"]
2881    pub fn CSTL_u16string_resize(
2882        instance: CSTL_UTF16StringRef,
2883        new_size: usize,
2884        ch: char16_t,
2885        alloc: *mut CSTL_Alloc,
2886    ) -> bool;
2887}
2888unsafe extern "C" {
2889    #[doc = " Find the first from offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2890    pub fn CSTL_u16string_find(
2891        instance: CSTL_UTF16StringCRef,
2892        ptr: *const char16_t,
2893        off: usize,
2894    ) -> usize;
2895}
2896unsafe extern "C" {
2897    #[doc = " Find the first from offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2898    pub fn CSTL_u16string_find_n(
2899        instance: CSTL_UTF16StringCRef,
2900        ptr: *const char16_t,
2901        off: usize,
2902        count: usize,
2903    ) -> usize;
2904}
2905unsafe extern "C" {
2906    #[doc = " Find the first from offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2907    pub fn CSTL_u16string_find_char(
2908        instance: CSTL_UTF16StringCRef,
2909        ch: char16_t,
2910        off: usize,
2911    ) -> usize;
2912}
2913unsafe extern "C" {
2914    #[doc = " Find the first from offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2915    pub fn CSTL_u16string_find_str(
2916        instance: CSTL_UTF16StringCRef,
2917        other: CSTL_UTF16StringCRef,
2918        off: usize,
2919    ) -> usize;
2920}
2921unsafe extern "C" {
2922    #[doc = " Find the last before offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2923    pub fn CSTL_u16string_rfind(
2924        instance: CSTL_UTF16StringCRef,
2925        ptr: *const char16_t,
2926        off: usize,
2927    ) -> usize;
2928}
2929unsafe extern "C" {
2930    #[doc = " Find the last before offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2931    pub fn CSTL_u16string_rfind_n(
2932        instance: CSTL_UTF16StringCRef,
2933        ptr: *const char16_t,
2934        off: usize,
2935        count: usize,
2936    ) -> usize;
2937}
2938unsafe extern "C" {
2939    #[doc = " Find the last before offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2940    pub fn CSTL_u16string_rfind_char(
2941        instance: CSTL_UTF16StringCRef,
2942        ch: char16_t,
2943        off: usize,
2944    ) -> usize;
2945}
2946unsafe extern "C" {
2947    #[doc = " Find the last before offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
2948    pub fn CSTL_u16string_rfind_str(
2949        instance: CSTL_UTF16StringCRef,
2950        other: CSTL_UTF16StringCRef,
2951        off: usize,
2952    ) -> usize;
2953}
2954unsafe extern "C" {
2955    #[doc = " Compare two null-terminated character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_UTF16String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
2956    pub fn CSTL_u16string_compare(
2957        left: *const char16_t,
2958        right: *const char16_t,
2959    ) -> ::std::os::raw::c_int;
2960}
2961unsafe extern "C" {
2962    #[doc = " Compare an explicit length character sequence with a null-terminated one.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n To compare an explicit length `left` and a null-terminated `right`,\n swap them and negate the result: `-CSTL_u16string_compare_n(right, left, left_count)`.\n\n There is no `CSTL_UTF16String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
2963    pub fn CSTL_u16string_compare_n(
2964        left: *const char16_t,
2965        right: *const char16_t,
2966        right_count: usize,
2967    ) -> ::std::os::raw::c_int;
2968}
2969unsafe extern "C" {
2970    #[doc = " Compare two explicit length character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_UTF16String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
2971    pub fn CSTL_u16string_compare_nn(
2972        left: *const char16_t,
2973        left_count: usize,
2974        right: *const char16_t,
2975        right_count: usize,
2976    ) -> ::std::os::raw::c_int;
2977}
2978#[doc = " STL ABI `std::basic_string` layout.\n\n Does not include the allocator, which nonetheless is a part of the `std::basic_string`\n structure! You are responsible for including it, since it can take on any form.\n\n Do not manipulate the members directly, use the associated functions!\n"]
2979#[repr(C)]
2980pub struct CSTL_UTF32StringVal {
2981    pub bx: CSTL_UTF32StringVal__bindgen_ty_1,
2982    pub size: usize,
2983    pub res: usize,
2984}
2985#[repr(C)]
2986#[derive(Copy, Clone)]
2987pub union CSTL_UTF32StringVal__bindgen_ty_1 {
2988    pub buf: [char32_t; 4usize],
2989    pub ptr: *mut char32_t,
2990}
2991#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2992const _: () = {
2993    ["Size of CSTL_UTF32StringVal__bindgen_ty_1"]
2994        [::std::mem::size_of::<CSTL_UTF32StringVal__bindgen_ty_1>() - 16usize];
2995    ["Alignment of CSTL_UTF32StringVal__bindgen_ty_1"]
2996        [::std::mem::align_of::<CSTL_UTF32StringVal__bindgen_ty_1>() - 8usize];
2997    ["Offset of field: CSTL_UTF32StringVal__bindgen_ty_1::buf"]
2998        [::std::mem::offset_of!(CSTL_UTF32StringVal__bindgen_ty_1, buf) - 0usize];
2999    ["Offset of field: CSTL_UTF32StringVal__bindgen_ty_1::ptr"]
3000        [::std::mem::offset_of!(CSTL_UTF32StringVal__bindgen_ty_1, ptr) - 0usize];
3001};
3002#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3003const _: () = {
3004    ["Size of CSTL_UTF32StringVal"][::std::mem::size_of::<CSTL_UTF32StringVal>() - 32usize];
3005    ["Alignment of CSTL_UTF32StringVal"][::std::mem::align_of::<CSTL_UTF32StringVal>() - 8usize];
3006    ["Offset of field: CSTL_UTF32StringVal::bx"]
3007        [::std::mem::offset_of!(CSTL_UTF32StringVal, bx) - 0usize];
3008    ["Offset of field: CSTL_UTF32StringVal::size"]
3009        [::std::mem::offset_of!(CSTL_UTF32StringVal, size) - 16usize];
3010    ["Offset of field: CSTL_UTF32StringVal::res"]
3011        [::std::mem::offset_of!(CSTL_UTF32StringVal, res) - 24usize];
3012};
3013#[doc = " Reference to a mutable `CSTL_UTF32StringVal`.\n\n Must not be null.\n"]
3014pub type CSTL_UTF32StringRef = *mut CSTL_UTF32StringVal;
3015#[doc = " Reference to a const `CSTL_UTF32StringVal`.\n\n Must not be null.\n"]
3016pub type CSTL_UTF32StringCRef = *const CSTL_UTF32StringVal;
3017unsafe extern "C" {
3018    #[doc = " Initializes the string, but does not allocate any memory.\n\n An initialized string can be trivially destroyed without leaks as long\n as its owned string is small enough to be inline (smaller than CSTL_string_alloc_mask).\n\n Re-initializing a string with a backing memory allocation will leak the old\n memory allocation.\n"]
3019    pub fn CSTL_u32string_construct(new_instance: *mut CSTL_UTF32StringVal);
3020}
3021unsafe extern "C" {
3022    #[doc = " Destroys the string, freeing the backing storage if necessary.\n"]
3023    pub fn CSTL_u32string_destroy(instance: CSTL_UTF32StringRef, alloc: *mut CSTL_Alloc);
3024}
3025unsafe extern "C" {
3026    #[doc = " Initializes the string with the substring at offset `other_off`\n in `other` with the length given by `count`.\n\n If `new_instance == NULL` or if `other_off` is outside of the range\n `[other, other + CSTL_u32string_size(other)]` returns `false` and does nothing,\n otherwise it returns `true`.\n\n If `new_instance == other` the substring operation is performed in-place without\n de-initializing `other`.\n\n Remember that re-initializing a different string with a backing memory allocation\n will leak the old memory allocation.\n"]
3027    pub fn CSTL_u32string_substr(
3028        new_instance: *mut CSTL_UTF32StringVal,
3029        other: CSTL_UTF32StringCRef,
3030        other_off: usize,
3031        count: usize,
3032        alloc: *mut CSTL_Alloc,
3033    ) -> bool;
3034}
3035unsafe extern "C" {
3036    #[doc = " Replaces the contents of `instance` with the null-terminated string at `ptr`.\n\n If the length of the string at `ptr` is greater than `CSTL_u32string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
3037    pub fn CSTL_u32string_assign(
3038        instance: CSTL_UTF32StringRef,
3039        ptr: *const char32_t,
3040        alloc: *mut CSTL_Alloc,
3041    ) -> bool;
3042}
3043unsafe extern "C" {
3044    #[doc = " Replaces the contents of `instance` with the first `count` characters of the string at `ptr`.\n\n If `n` is greater than `CSTL_u32string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
3045    pub fn CSTL_u32string_assign_n(
3046        instance: CSTL_UTF32StringRef,
3047        ptr: *const char32_t,
3048        count: usize,
3049        alloc: *mut CSTL_Alloc,
3050    ) -> bool;
3051}
3052unsafe extern "C" {
3053    #[doc = " Replaces the contents of `instance` with the `count` copies of the character `ch`.\n\n If `count` is greater than `CSTL_u32string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
3054    pub fn CSTL_u32string_assign_char(
3055        instance: CSTL_UTF32StringRef,
3056        count: usize,
3057        ch: char32_t,
3058        alloc: *mut CSTL_Alloc,
3059    ) -> bool;
3060}
3061unsafe extern "C" {
3062    #[doc = " Replaces the contents of `instance` with the substring at offset `other_off` in `other`\n with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_u32string_size(other)]` returns\n `false` and does nothing, otherwise it returns `true`.\n"]
3063    pub fn CSTL_u32string_assign_substr(
3064        instance: CSTL_UTF32StringRef,
3065        other: CSTL_UTF32StringCRef,
3066        other_off: usize,
3067        count: usize,
3068        alloc: *mut CSTL_Alloc,
3069    ) -> bool;
3070}
3071unsafe extern "C" {
3072    #[doc = " Replaces the contents of `instance` with the contents of `other_instance`.\n\n If `propagate_alloc == true && alloc != other_alloc` then storage\n is freed with `alloc` and allocated again with `other_alloc` before contents\n are copied. Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false` `instance` keeps using `alloc` as its allocator,\n potentially reusing its storage.\n\n You are responsible for replacing the allocator outside of `CSTL_UTF32StringVal` if applicable.\n"]
3073    pub fn CSTL_u32string_copy_assign(
3074        instance: CSTL_UTF32StringRef,
3075        alloc: *mut CSTL_Alloc,
3076        other_instance: CSTL_UTF32StringCRef,
3077        other_alloc: *mut CSTL_Alloc,
3078        propagate_alloc: bool,
3079    );
3080}
3081unsafe extern "C" {
3082    #[doc = " Moves the contents of `other_instance` to the contents of `instance`.\n\n If `propagate_alloc == true` storage is replaced with storage of `other_instance`.\n Then, `instance` uses `other_alloc` as its allocator.\n\n If `propagate_alloc == false && alloc != other_alloc` then storage is reused\n and individual characters of `other` are moved in. Then, `instance` uses `alloc` as its allocator.\n\n You are responsible for replacing the allocator outside of `CSTL_UTF32StringVal` if applicable.\n"]
3083    pub fn CSTL_u32string_move_assign(
3084        instance: CSTL_UTF32StringRef,
3085        alloc: *mut CSTL_Alloc,
3086        other_instance: CSTL_UTF32StringRef,
3087        other_alloc: *mut CSTL_Alloc,
3088        propagate_alloc: bool,
3089    );
3090}
3091unsafe extern "C" {
3092    #[doc = " Swaps string contents.\n\n You are responsible for swapping the allocators.\n"]
3093    pub fn CSTL_u32string_swap(instance: CSTL_UTF32StringRef, other_instance: CSTL_UTF32StringRef);
3094}
3095unsafe extern "C" {
3096    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_u32string_length(instance)` the behavior is undefined.\n"]
3097    pub fn CSTL_u32string_index(instance: CSTL_UTF32StringRef, pos: usize) -> *mut char32_t;
3098}
3099unsafe extern "C" {
3100    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_u32string_length(instance)` the behavior is undefined.\n"]
3101    pub fn CSTL_u32string_const_index(
3102        instance: CSTL_UTF32StringCRef,
3103        pos: usize,
3104    ) -> *const char32_t;
3105}
3106unsafe extern "C" {
3107    #[doc = " Returns a pointer to the character at `pos`.\n\n If `pos >= CSTL_u32string_length(instance)` a null pointer is returned.\n"]
3108    pub fn CSTL_u32string_at(instance: CSTL_UTF32StringRef, pos: usize) -> *mut char32_t;
3109}
3110unsafe extern "C" {
3111    #[doc = " Returns a const pointer to the character at `pos`.\n\n If `pos >= CSTL_u32string_length(instance)` a null pointer is returned.\n"]
3112    pub fn CSTL_u32string_const_at(instance: CSTL_UTF32StringCRef, pos: usize) -> *const char32_t;
3113}
3114unsafe extern "C" {
3115    #[doc = " Returns a pointer to the first character.\n\n If `CSTL_u32string_empty(instance) == true` the behavior is undefined.\n"]
3116    pub fn CSTL_u32string_front(instance: CSTL_UTF32StringRef) -> *mut char32_t;
3117}
3118unsafe extern "C" {
3119    #[doc = " Returns a const pointer to the first character.\n\n If `CSTL_u32string_empty(instance) == true` the behavior is undefined.\n"]
3120    pub fn CSTL_u32string_const_front(instance: CSTL_UTF32StringCRef) -> *const char32_t;
3121}
3122unsafe extern "C" {
3123    #[doc = " Returns a pointer to the last character.\n\n If `CSTL_u32string_empty(instance) == true` the behavior is undefined.\n"]
3124    pub fn CSTL_u32string_back(instance: CSTL_UTF32StringRef) -> *mut char32_t;
3125}
3126unsafe extern "C" {
3127    #[doc = " Returns a const pointer to the last character.\n\n If `CSTL_u32string_empty(instance) == true` the behavior is undefined.\n"]
3128    pub fn CSTL_u32string_const_back(instance: CSTL_UTF32StringCRef) -> *const char32_t;
3129}
3130unsafe extern "C" {
3131    #[doc = " Returns a pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_u32string_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_u32string_data(instance), CSTL_u32string_data(instance) + size]`\n is always valid.\n\n The array may be mutated through the returned pointer excluding\n the past-the-end null terminator.\n"]
3132    pub fn CSTL_u32string_data(instance: CSTL_UTF32StringRef) -> *mut char32_t;
3133}
3134unsafe extern "C" {
3135    #[doc = " Returns a const pointer to the underlying null-terminated array\n serving as character storage.\n\n If `CSTL_u32string_empty(instance) == true` the pointer is still\n valid and points to a single null character.\n\n The range `[CSTL_u32string_c_str(instance), CSTL_u32string_c_str(instance) + size]`\n is always valid.\n"]
3136    pub fn CSTL_u32string_c_str(instance: CSTL_UTF32StringCRef) -> *const char32_t;
3137}
3138unsafe extern "C" {
3139    #[doc = " Returns an iterator (pointer) to the first character of the string.\n\n If `CSTL_u32string_empty(instance) == true` then\n `CSTL_u32string_begin(instance) == CSTL_u32string_end(instance)`.\n"]
3140    pub fn CSTL_u32string_begin(instance: CSTL_UTF32StringRef) -> *mut char32_t;
3141}
3142unsafe extern "C" {
3143    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_u32string_empty(instance) == true` then\n `CSTL_u32string_begin(instance) == CSTL_u32string_end(instance)`.\n"]
3144    pub fn CSTL_u32string_const_begin(instance: CSTL_UTF32StringCRef) -> *const char32_t;
3145}
3146unsafe extern "C" {
3147    #[doc = " Returns an iterator (pointer) past the last character of the string.\n\n If `CSTL_u32string_empty(instance) == true` then\n `CSTL_u32string_begin(instance) == CSTL_u32string_end(instance)`.\n"]
3148    pub fn CSTL_u32string_end(instance: CSTL_UTF32StringRef) -> *mut char32_t;
3149}
3150unsafe extern "C" {
3151    #[doc = " Returns a const iterator (pointer) past the last character of the string.\n\n If `CSTL_u32string_empty(instance) == true` then\n `CSTL_u32string_const_begin(instance) == CSTL_u32string_const_end(instance)`.\n"]
3152    pub fn CSTL_u32string_const_end(instance: CSTL_UTF32StringCRef) -> *const char32_t;
3153}
3154unsafe extern "C" {
3155    #[doc = " Returns `true` if the string is empty or `false` otherwise.\n"]
3156    pub fn CSTL_u32string_empty(instance: CSTL_UTF32StringCRef) -> bool;
3157}
3158unsafe extern "C" {
3159    #[doc = " Returns the number of characters in the string.\n"]
3160    pub fn CSTL_u32string_size(instance: CSTL_UTF32StringCRef) -> usize;
3161}
3162unsafe extern "C" {
3163    #[doc = " Returns the number of characters in the string.\n"]
3164    pub fn CSTL_u32string_length(instance: CSTL_UTF32StringCRef) -> usize;
3165}
3166unsafe extern "C" {
3167    #[doc = " Returns the total characters capacity of the string.\n"]
3168    pub fn CSTL_u32string_capacity(instance: CSTL_UTF32StringCRef) -> usize;
3169}
3170unsafe extern "C" {
3171    #[doc = " Returns the maximum possible number of characters in the string.\n"]
3172    pub fn CSTL_u32string_max_size() -> usize;
3173}
3174unsafe extern "C" {
3175    #[doc = " If `new_capacity > CSTL_u32string_capacity(instance)`, reallocates and expands\n the underlying array storage.\n\n If `new_capacity` exceeds `CSTL_u32string_max_size()` this function has no effect\n and returns `false`, otherwise it returns `true`.\n"]
3176    pub fn CSTL_u32string_reserve(
3177        instance: CSTL_UTF32StringRef,
3178        new_capacity: usize,
3179        alloc: *mut CSTL_Alloc,
3180    ) -> bool;
3181}
3182unsafe extern "C" {
3183    #[doc = " Request removal of unused capacity.\n"]
3184    pub fn CSTL_u32string_shrink_to_fit(instance: CSTL_UTF32StringRef, alloc: *mut CSTL_Alloc);
3185}
3186unsafe extern "C" {
3187    #[doc = " Erase all characters from the string without affecting capacity.\n"]
3188    pub fn CSTL_u32string_clear(instance: CSTL_UTF32StringRef);
3189}
3190unsafe extern "C" {
3191    #[doc = " Inserts the null-terminated string at `ptr` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
3192    pub fn CSTL_u32string_insert(
3193        instance: CSTL_UTF32StringRef,
3194        where_: *const char32_t,
3195        ptr: *const char32_t,
3196        alloc: *mut CSTL_Alloc,
3197    ) -> *mut char32_t;
3198}
3199unsafe extern "C" {
3200    #[doc = " Inserts the first `count` characters of the string at `ptr` at the pointer  `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
3201    pub fn CSTL_u32string_insert_n(
3202        instance: CSTL_UTF32StringRef,
3203        where_: *const char32_t,
3204        ptr: *const char32_t,
3205        count: usize,
3206        alloc: *mut CSTL_Alloc,
3207    ) -> *mut char32_t;
3208}
3209unsafe extern "C" {
3210    #[doc = " Inserts `count` copies of the character `ch` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
3211    pub fn CSTL_u32string_insert_char(
3212        instance: CSTL_UTF32StringRef,
3213        where_: *const char32_t,
3214        count: usize,
3215        ch: char32_t,
3216        alloc: *mut CSTL_Alloc,
3217    ) -> *mut char32_t;
3218}
3219unsafe extern "C" {
3220    #[doc = " Inserts the string `other` at the pointer `where` in `instance`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
3221    pub fn CSTL_u32string_insert_str(
3222        instance: CSTL_UTF32StringRef,
3223        where_: *const char32_t,
3224        other: CSTL_UTF32StringCRef,
3225        alloc: *mut CSTL_Alloc,
3226    ) -> *mut char32_t;
3227}
3228unsafe extern "C" {
3229    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at the pointer `where` in `instance`.\n\n If `other_off` is outside of the range `[other, other + CSTL_u32string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `NULL`, otherwise it returns a pointer\n to the first inserted character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
3230    pub fn CSTL_u32string_insert_substr(
3231        instance: CSTL_UTF32StringRef,
3232        where_: *const char32_t,
3233        other: CSTL_UTF32StringCRef,
3234        other_off: usize,
3235        count: usize,
3236        alloc: *mut CSTL_Alloc,
3237    ) -> *mut char32_t;
3238}
3239unsafe extern "C" {
3240    #[doc = " Inserts the null-terminated string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3241    pub fn CSTL_u32string_insert_at(
3242        instance: CSTL_UTF32StringRef,
3243        off: usize,
3244        ptr: *const char32_t,
3245        alloc: *mut CSTL_Alloc,
3246    ) -> bool;
3247}
3248unsafe extern "C" {
3249    #[doc = " Inserts the first `count` characters of the string at `ptr` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3250    pub fn CSTL_u32string_insert_n_at(
3251        instance: CSTL_UTF32StringRef,
3252        off: usize,
3253        ptr: *const char32_t,
3254        count: usize,
3255        alloc: *mut CSTL_Alloc,
3256    ) -> bool;
3257}
3258unsafe extern "C" {
3259    #[doc = " Inserts `count` copies of the character `ch` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3260    pub fn CSTL_u32string_insert_char_at(
3261        instance: CSTL_UTF32StringRef,
3262        off: usize,
3263        count: usize,
3264        ch: char32_t,
3265        alloc: *mut CSTL_Alloc,
3266    ) -> bool;
3267}
3268unsafe extern "C" {
3269    #[doc = " Inserts the string `other` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3270    pub fn CSTL_u32string_insert_str_at(
3271        instance: CSTL_UTF32StringRef,
3272        off: usize,
3273        other: CSTL_UTF32StringCRef,
3274        alloc: *mut CSTL_Alloc,
3275    ) -> bool;
3276}
3277unsafe extern "C" {
3278    #[doc = " Inserts the substring at offset `other_off` in `other` with the length\n given by `count` at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_u32string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3279    pub fn CSTL_u32string_insert_substr_at(
3280        instance: CSTL_UTF32StringRef,
3281        off: usize,
3282        other: CSTL_UTF32StringCRef,
3283        other_off: usize,
3284        count: usize,
3285        alloc: *mut CSTL_Alloc,
3286    ) -> bool;
3287}
3288unsafe extern "C" {
3289    #[doc = " Removes the character at `where` and returns a pointer following the\n removed character.\n\n The pointer `where` must be valid and dereferenceable on `instance`.\n"]
3290    pub fn CSTL_u32string_erase(
3291        instance: CSTL_UTF32StringRef,
3292        where_: *const char32_t,
3293    ) -> *mut char32_t;
3294}
3295unsafe extern "C" {
3296    #[doc = " Removes the characters in the range `[first, last)` and returns a pointer following the\n removed character.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
3297    pub fn CSTL_u32string_erase_substr(
3298        instance: CSTL_UTF32StringRef,
3299        first: *const char32_t,
3300        last: *const char32_t,
3301    ) -> *mut char32_t;
3302}
3303unsafe extern "C" {
3304    #[doc = " Removes the character at offset `off` in `instance`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3305    pub fn CSTL_u32string_erase_at(instance: CSTL_UTF32StringRef, off: usize) -> bool;
3306}
3307unsafe extern "C" {
3308    #[doc = " Removes the substring at offset `off` in `instance` with the length given by `count`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3309    pub fn CSTL_u32string_erase_substr_at(
3310        instance: CSTL_UTF32StringRef,
3311        off: usize,
3312        count: usize,
3313    ) -> bool;
3314}
3315unsafe extern "C" {
3316    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_u32string_size(instance) == CSTL_u32string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
3317    pub fn CSTL_u32string_push_back(
3318        instance: CSTL_UTF32StringRef,
3319        ch: char32_t,
3320        alloc: *mut CSTL_Alloc,
3321    ) -> bool;
3322}
3323unsafe extern "C" {
3324    #[doc = " Appends the character `ch` to the end of the string.\n\n If `CSTL_u32string_size(instance) == CSTL_u32string_max_size()` this function\n has no effect and returns `false`, otherwise it returns `true`.\n"]
3325    pub fn CSTL_u32string_pop_back(instance: CSTL_UTF32StringRef);
3326}
3327unsafe extern "C" {
3328    #[doc = " Appends the null-terminated string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3329    pub fn CSTL_u32string_append(
3330        instance: CSTL_UTF32StringRef,
3331        ptr: *const char32_t,
3332        alloc: *mut CSTL_Alloc,
3333    ) -> bool;
3334}
3335unsafe extern "C" {
3336    #[doc = " Appends the first `count` characters of the string at `ptr` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3337    pub fn CSTL_u32string_append_n(
3338        instance: CSTL_UTF32StringRef,
3339        ptr: *const char32_t,
3340        count: usize,
3341        alloc: *mut CSTL_Alloc,
3342    ) -> bool;
3343}
3344unsafe extern "C" {
3345    #[doc = " Appends `count` copies of the character `ch` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3346    pub fn CSTL_u32string_append_char(
3347        instance: CSTL_UTF32StringRef,
3348        count: usize,
3349        ch: char32_t,
3350        alloc: *mut CSTL_Alloc,
3351    ) -> bool;
3352}
3353unsafe extern "C" {
3354    #[doc = " Appends the string `other` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3355    pub fn CSTL_u32string_append_str(
3356        instance: CSTL_UTF32StringRef,
3357        other: CSTL_UTF32StringCRef,
3358        alloc: *mut CSTL_Alloc,
3359    ) -> bool;
3360}
3361unsafe extern "C" {
3362    #[doc = " Appends the substring at offset `other_off` in `other` with the length\n given by `count` to `instance`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3363    pub fn CSTL_u32string_append_substr(
3364        instance: CSTL_UTF32StringRef,
3365        other: CSTL_UTF32StringCRef,
3366        other_off: usize,
3367        count: usize,
3368        alloc: *mut CSTL_Alloc,
3369    ) -> bool;
3370}
3371unsafe extern "C" {
3372    #[doc = " Replaces the characters in the range `[first, last)` with the null-terminated\n string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
3373    pub fn CSTL_u32string_replace(
3374        instance: CSTL_UTF32StringRef,
3375        first: *const char32_t,
3376        last: *const char32_t,
3377        ptr: *const char32_t,
3378        alloc: *mut CSTL_Alloc,
3379    ) -> bool;
3380}
3381unsafe extern "C" {
3382    #[doc = " Replaces the characters in the range `[first, last)` with the first `count`\n characters of the string at `ptr`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
3383    pub fn CSTL_u32string_replace_n(
3384        instance: CSTL_UTF32StringRef,
3385        first: *const char32_t,
3386        last: *const char32_t,
3387        ptr: *const char32_t,
3388        count: usize,
3389        alloc: *mut CSTL_Alloc,
3390    ) -> bool;
3391}
3392unsafe extern "C" {
3393    #[doc = " Replaces the characters in the range `[first, last)` with `count` copies\n of the character `ch`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
3394    pub fn CSTL_u32string_replace_char(
3395        instance: CSTL_UTF32StringRef,
3396        first: *const char32_t,
3397        last: *const char32_t,
3398        count: usize,
3399        ch: char32_t,
3400        alloc: *mut CSTL_Alloc,
3401    ) -> bool;
3402}
3403unsafe extern "C" {
3404    #[doc = " Replaces the characters in the range `[first, last)` with the string `other`.\n\n If the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
3405    pub fn CSTL_u32string_replace_str(
3406        instance: CSTL_UTF32StringRef,
3407        first: *const char32_t,
3408        last: *const char32_t,
3409        other: CSTL_UTF32StringCRef,
3410        alloc: *mut CSTL_Alloc,
3411    ) -> bool;
3412}
3413unsafe extern "C" {
3414    #[doc = " Replaces the characters in the range `[first, last)` with the substring\n at offset `other_off` in `other` with the length given by `count`.\n\n If `other_off` is outside of the range `[other, other + CSTL_u32string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n\n If `first == last`, no operation is performed.\n\n The range `[first, last)` must be valid and dereferenceable on `instance`.\n"]
3415    pub fn CSTL_u32string_replace_substr(
3416        instance: CSTL_UTF32StringRef,
3417        first: *const char32_t,
3418        last: *const char32_t,
3419        other: CSTL_UTF32StringCRef,
3420        other_off: usize,
3421        count: usize,
3422        alloc: *mut CSTL_Alloc,
3423    ) -> bool;
3424}
3425unsafe extern "C" {
3426    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the null-terminated string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3427    pub fn CSTL_u32string_replace_at(
3428        instance: CSTL_UTF32StringRef,
3429        off: usize,
3430        count: usize,
3431        ptr: *const char32_t,
3432        alloc: *mut CSTL_Alloc,
3433    ) -> bool;
3434}
3435unsafe extern "C" {
3436    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the first `count2` characters of the string at `ptr`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3437    pub fn CSTL_u32string_replace_n_at(
3438        instance: CSTL_UTF32StringRef,
3439        off: usize,
3440        count: usize,
3441        ptr: *const char32_t,
3442        count2: usize,
3443        alloc: *mut CSTL_Alloc,
3444    ) -> bool;
3445}
3446unsafe extern "C" {
3447    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with `count` copies of the character `ch`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3448    pub fn CSTL_u32string_replace_char_at(
3449        instance: CSTL_UTF32StringRef,
3450        off: usize,
3451        count: usize,
3452        count2: usize,
3453        ch: char32_t,
3454        alloc: *mut CSTL_Alloc,
3455    ) -> bool;
3456}
3457unsafe extern "C" {
3458    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the string `other`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3459    pub fn CSTL_u32string_replace_str_at(
3460        instance: CSTL_UTF32StringRef,
3461        off: usize,
3462        count: usize,
3463        other: CSTL_UTF32StringCRef,
3464        alloc: *mut CSTL_Alloc,
3465    ) -> bool;
3466}
3467unsafe extern "C" {
3468    #[doc = " Replaces the substring at offset `off` in `instance` with the length given by `count`\n with the substring at offset `other_off` in `other` with the length\n given by `count2`.\n\n If `off` is outside of the range `[instance, instance + CSTL_u32string_size(instance)]`\n or if `other_off` is outside of the range `[other, other + CSTL_u32string_size(other)]`\n or if the length of the resulting string is greater than `CSTL_u32string_max_size()`\n this function has no effect and returns `false`, otherwise it returns `true`.\n"]
3469    pub fn CSTL_u32string_replace_substr_at(
3470        instance: CSTL_UTF32StringRef,
3471        off: usize,
3472        count: usize,
3473        other: CSTL_UTF32StringCRef,
3474        other_off: usize,
3475        count2: usize,
3476        alloc: *mut CSTL_Alloc,
3477    ) -> bool;
3478}
3479unsafe extern "C" {
3480    #[doc = " Copies a substring `[off, off + count)` to character string pointed to by\n `dest`. The resulting character string is not null terminated.\n\n Returns the number of characters copied or `CSTL_string_npos` if\n `off > CSTL_u32string_size(instance)` (out of range).\n"]
3481    pub fn CSTL_u32string_copy(
3482        instance: CSTL_UTF32StringCRef,
3483        dest: *mut char32_t,
3484        count: usize,
3485        off: usize,
3486    ) -> usize;
3487}
3488unsafe extern "C" {
3489    #[doc = " Resizes the string to contain `new_size` characters, appending `ch`\n if current size is less than `new_size`.\n\n If `new_size` is greater than `CSTL_u32string_max_size()` this\n function has no effect and returns `false`, otherwise it returns `true`.\n"]
3490    pub fn CSTL_u32string_resize(
3491        instance: CSTL_UTF32StringRef,
3492        new_size: usize,
3493        ch: char32_t,
3494        alloc: *mut CSTL_Alloc,
3495    ) -> bool;
3496}
3497unsafe extern "C" {
3498    #[doc = " Find the first from offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
3499    pub fn CSTL_u32string_find(
3500        instance: CSTL_UTF32StringCRef,
3501        ptr: *const char32_t,
3502        off: usize,
3503    ) -> usize;
3504}
3505unsafe extern "C" {
3506    #[doc = " Find the first from offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
3507    pub fn CSTL_u32string_find_n(
3508        instance: CSTL_UTF32StringCRef,
3509        ptr: *const char32_t,
3510        off: usize,
3511        count: usize,
3512    ) -> usize;
3513}
3514unsafe extern "C" {
3515    #[doc = " Find the first from offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
3516    pub fn CSTL_u32string_find_char(
3517        instance: CSTL_UTF32StringCRef,
3518        ch: char32_t,
3519        off: usize,
3520    ) -> usize;
3521}
3522unsafe extern "C" {
3523    #[doc = " Find the first from offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
3524    pub fn CSTL_u32string_find_str(
3525        instance: CSTL_UTF32StringCRef,
3526        other: CSTL_UTF32StringCRef,
3527        off: usize,
3528    ) -> usize;
3529}
3530unsafe extern "C" {
3531    #[doc = " Find the last before offset `off` substring equal to the null-terminated string `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
3532    pub fn CSTL_u32string_rfind(
3533        instance: CSTL_UTF32StringCRef,
3534        ptr: *const char32_t,
3535        off: usize,
3536    ) -> usize;
3537}
3538unsafe extern "C" {
3539    #[doc = " Find the last before offset `off` substring equal to the first `count` characters at `ptr`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
3540    pub fn CSTL_u32string_rfind_n(
3541        instance: CSTL_UTF32StringCRef,
3542        ptr: *const char32_t,
3543        off: usize,
3544        count: usize,
3545    ) -> usize;
3546}
3547unsafe extern "C" {
3548    #[doc = " Find the last before offset `off` occurence of the character `ch`\n and return its position from the start of the string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
3549    pub fn CSTL_u32string_rfind_char(
3550        instance: CSTL_UTF32StringCRef,
3551        ch: char32_t,
3552        off: usize,
3553    ) -> usize;
3554}
3555unsafe extern "C" {
3556    #[doc = " Find the last before offset `off` substring equal to the string `other`\n and return its position from the start of the original string.\n\n If no match is found `CSTL_string_npos` is returned.\n"]
3557    pub fn CSTL_u32string_rfind_str(
3558        instance: CSTL_UTF32StringCRef,
3559        other: CSTL_UTF32StringCRef,
3560        off: usize,
3561    ) -> usize;
3562}
3563unsafe extern "C" {
3564    #[doc = " Compare two null-terminated character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_UTF32String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
3565    pub fn CSTL_u32string_compare(
3566        left: *const char32_t,
3567        right: *const char32_t,
3568    ) -> ::std::os::raw::c_int;
3569}
3570unsafe extern "C" {
3571    #[doc = " Compare an explicit length character sequence with a null-terminated one.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n To compare an explicit length `left` and a null-terminated `right`,\n swap them and negate the result: `-CSTL_u32string_compare_n(right, left, left_count)`.\n\n There is no `CSTL_UTF32String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
3572    pub fn CSTL_u32string_compare_n(
3573        left: *const char32_t,
3574        right: *const char32_t,
3575        right_count: usize,
3576    ) -> ::std::os::raw::c_int;
3577}
3578unsafe extern "C" {
3579    #[doc = " Compare two explicit length character sequences.\n\n The return value is negative if `left` compares less than `right`,\n positive if it compares greater and zero if `left` and `right`\n compare equal.\n\n There is no `CSTL_UTF32String` version of this function as the return\n value does not allow for reporting out of bounds errors.\n"]
3580    pub fn CSTL_u32string_compare_nn(
3581        left: *const char32_t,
3582        left_count: usize,
3583        right: *const char32_t,
3584        right_count: usize,
3585    ) -> ::std::os::raw::c_int;
3586}