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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Multibyte / wide string and character conversion functions <a id="c.mb.wcs">[[c.mb.wcs]]</a>
|
| 2 |
+
|
| 3 |
+
[*Note 1*: The headers `<cstdlib>` ([[cstdlib.syn]]) and `<cwchar>` (
|
| 4 |
+
[[cwchar.syn]]) declare the functions described in this
|
| 5 |
+
subclause. — *end note*]
|
| 6 |
+
|
| 7 |
+
``` cpp
|
| 8 |
+
int mbsinit(const mbstate_t* ps);
|
| 9 |
+
int mblen(const char* s, size_t n);
|
| 10 |
+
size_t mbstowcs(wchar_t* pwcs, const char* s, size_t n);
|
| 11 |
+
size_t wcstombs(char* s, const wchar_t* pwcs, size_t n);
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
*Effects:* These functions have the semantics specified in the C
|
| 15 |
+
standard library.
|
| 16 |
+
|
| 17 |
+
ISO C 7.22.7.1, 7.22.8, 7.29.6.2.1
|
| 18 |
+
|
| 19 |
+
``` cpp
|
| 20 |
+
int mbtowc(wchar_t* pwc, const char* s, size_t n);
|
| 21 |
+
int wctomb(char* s, wchar_t wchar);
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
*Effects:* These functions have the semantics specified in the C
|
| 25 |
+
standard library.
|
| 26 |
+
|
| 27 |
+
*Remarks:* Calls to these functions may introduce a data
|
| 28 |
+
race ([[res.on.data.races]]) with other calls to the same function.
|
| 29 |
+
|
| 30 |
+
ISO C 7.22.7
|
| 31 |
+
|
| 32 |
+
``` cpp
|
| 33 |
+
size_t mbrlen(const char* s, size_t n, mbstate_t* ps);
|
| 34 |
+
size_t mbrtowc(wchar_t* pwc, const char* s, size_t n, mbstate_t* ps);
|
| 35 |
+
size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps);
|
| 36 |
+
size_t mbsrtowcs(wchar_t* dst, const char** src, size_t len, mbstate_t* ps);
|
| 37 |
+
size_t wcsrtombs(char* dst, const wchar_t** src, size_t len, mbstate_t* ps);
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
*Effects:* These functions have the semantics specified in the C
|
| 41 |
+
standard library.
|
| 42 |
+
|
| 43 |
+
*Remarks:* Calling these functions with an `mbstate_t*` argument that is
|
| 44 |
+
a null pointer value may introduce a data race ([[res.on.data.races]])
|
| 45 |
+
with other calls to the same function with an `mbstate_t*` argument that
|
| 46 |
+
is a null pointer value.
|
| 47 |
+
|
| 48 |
+
ISO C 7.29.6.3
|
| 49 |
+
|
| 50 |
+
<!-- Link reference definitions -->
|
| 51 |
+
[basic.string]: #basic.string
|
| 52 |
+
[basic.string.hash]: #basic.string.hash
|
| 53 |
+
[basic.string.literals]: #basic.string.literals
|
| 54 |
+
[basic.types]: basic.md#basic.types
|
| 55 |
+
[c.mb.wcs]: #c.mb.wcs
|
| 56 |
+
[c.strings]: #c.strings
|
| 57 |
+
[cctype.syn]: #cctype.syn
|
| 58 |
+
[char.traits]: #char.traits
|
| 59 |
+
[char.traits.require]: #char.traits.require
|
| 60 |
+
[char.traits.specializations]: #char.traits.specializations
|
| 61 |
+
[char.traits.specializations.char]: #char.traits.specializations.char
|
| 62 |
+
[char.traits.specializations.char16_t]: #char.traits.specializations.char16_t
|
| 63 |
+
[char.traits.specializations.char32_t]: #char.traits.specializations.char32_t
|
| 64 |
+
[char.traits.specializations.wchar.t]: #char.traits.specializations.wchar.t
|
| 65 |
+
[char.traits.typedefs]: #char.traits.typedefs
|
| 66 |
+
[container.requirements]: containers.md#container.requirements
|
| 67 |
+
[container.requirements.general]: containers.md#container.requirements.general
|
| 68 |
+
[csignal.syn]: language.md#csignal.syn
|
| 69 |
+
[cstdlib.syn]: language.md#cstdlib.syn
|
| 70 |
+
[cstring.syn]: #cstring.syn
|
| 71 |
+
[cuchar.syn]: #cuchar.syn
|
| 72 |
+
[cwchar.syn]: #cwchar.syn
|
| 73 |
+
[cwctype.syn]: #cwctype.syn
|
| 74 |
+
[input.output]: input.md#input.output
|
| 75 |
+
[iostate.flags]: input.md#iostate.flags
|
| 76 |
+
[iostream.forward]: input.md#iostream.forward
|
| 77 |
+
[iostreams.limits.pos]: input.md#iostreams.limits.pos
|
| 78 |
+
[istream.formatted.reqmts]: input.md#istream.formatted.reqmts
|
| 79 |
+
[istream.unformatted]: input.md#istream.unformatted
|
| 80 |
+
[iterator.range]: iterators.md#iterator.range
|
| 81 |
+
[iterator.requirements.general]: iterators.md#iterator.requirements.general
|
| 82 |
+
[length.error]: diagnostics.md#length.error
|
| 83 |
+
[library.c]: library.md#library.c
|
| 84 |
+
[ostream.formatted.reqmts]: input.md#ostream.formatted.reqmts
|
| 85 |
+
[out.of.range]: diagnostics.md#out.of.range
|
| 86 |
+
[random.access.iterators]: iterators.md#random.access.iterators
|
| 87 |
+
[res.on.data.races]: library.md#res.on.data.races
|
| 88 |
+
[sequence.reqmts]: containers.md#sequence.reqmts
|
| 89 |
+
[string.access]: #string.access
|
| 90 |
+
[string.accessors]: #string.accessors
|
| 91 |
+
[string.append]: #string.append
|
| 92 |
+
[string.assign]: #string.assign
|
| 93 |
+
[string.capacity]: #string.capacity
|
| 94 |
+
[string.classes]: #string.classes
|
| 95 |
+
[string.compare]: #string.compare
|
| 96 |
+
[string.cons]: #string.cons
|
| 97 |
+
[string.conversions]: #string.conversions
|
| 98 |
+
[string.copy]: #string.copy
|
| 99 |
+
[string.erase]: #string.erase
|
| 100 |
+
[string.find]: #string.find
|
| 101 |
+
[string.find.first.not.of]: #string.find.first.not.of
|
| 102 |
+
[string.find.first.of]: #string.find.first.of
|
| 103 |
+
[string.find.last.not.of]: #string.find.last.not.of
|
| 104 |
+
[string.find.last.of]: #string.find.last.of
|
| 105 |
+
[string.insert]: #string.insert
|
| 106 |
+
[string.io]: #string.io
|
| 107 |
+
[string.iterators]: #string.iterators
|
| 108 |
+
[string.modifiers]: #string.modifiers
|
| 109 |
+
[string.nonmembers]: #string.nonmembers
|
| 110 |
+
[string.op!=]: #string.op!=
|
| 111 |
+
[string.op+]: #string.op+
|
| 112 |
+
[string.op+=]: #string.op+=
|
| 113 |
+
[string.op<]: #string.op<
|
| 114 |
+
[string.op<=]: #string.op<=
|
| 115 |
+
[string.op>]: #string.op>
|
| 116 |
+
[string.op>=]: #string.op>=
|
| 117 |
+
[string.operator==]: #string.operator==
|
| 118 |
+
[string.ops]: #string.ops
|
| 119 |
+
[string.replace]: #string.replace
|
| 120 |
+
[string.require]: #string.require
|
| 121 |
+
[string.rfind]: #string.rfind
|
| 122 |
+
[string.special]: #string.special
|
| 123 |
+
[string.substr]: #string.substr
|
| 124 |
+
[string.swap]: #string.swap
|
| 125 |
+
[string.syn]: #string.syn
|
| 126 |
+
[string.view]: #string.view
|
| 127 |
+
[string.view.access]: #string.view.access
|
| 128 |
+
[string.view.capacity]: #string.view.capacity
|
| 129 |
+
[string.view.comparison]: #string.view.comparison
|
| 130 |
+
[string.view.cons]: #string.view.cons
|
| 131 |
+
[string.view.find]: #string.view.find
|
| 132 |
+
[string.view.hash]: #string.view.hash
|
| 133 |
+
[string.view.io]: #string.view.io
|
| 134 |
+
[string.view.iterators]: #string.view.iterators
|
| 135 |
+
[string.view.literals]: #string.view.literals
|
| 136 |
+
[string.view.modifiers]: #string.view.modifiers
|
| 137 |
+
[string.view.ops]: #string.view.ops
|
| 138 |
+
[string.view.synop]: #string.view.synop
|
| 139 |
+
[string.view.template]: #string.view.template
|
| 140 |
+
[strings]: #strings
|
| 141 |
+
[strings.general]: #strings.general
|
| 142 |
+
[tab:char.traits.require]: #tab:char.traits.require
|
| 143 |
+
[tab:copyassignable]: #tab:copyassignable
|
| 144 |
+
[tab:copyconstructible]: #tab:copyconstructible
|
| 145 |
+
[tab:defaultconstructible]: #tab:defaultconstructible
|
| 146 |
+
[tab:string.view.compare]: #tab:string.view.compare
|
| 147 |
+
[tab:string.view.comparison.overloads]: #tab:string.view.comparison.overloads
|
| 148 |
+
[tab:string.view.ctr.2]: #tab:string.view.ctr.2
|
| 149 |
+
[tab:string.view.ctr.3]: #tab:string.view.ctr.3
|
| 150 |
+
[tab:strings.compare]: #tab:strings.compare
|
| 151 |
+
[tab:strings.ctr.1]: #tab:strings.ctr.1
|
| 152 |
+
[tab:strings.ctr.2]: #tab:strings.ctr.2
|
| 153 |
+
[tab:strings.ctr.3]: #tab:strings.ctr.3
|
| 154 |
+
[tab:strings.ctr.4]: #tab:strings.ctr.4
|
| 155 |
+
[tab:strings.ctr.5]: #tab:strings.ctr.5
|
| 156 |
+
[tab:strings.ctr.6]: #tab:strings.ctr.6
|
| 157 |
+
[tab:strings.ctr.cpy]: #tab:strings.ctr.cpy
|
| 158 |
+
[tab:strings.lib.summary]: #tab:strings.lib.summary
|
| 159 |
+
[tab:strings.op=]: #tab:strings.op=
|
| 160 |
+
[unord.hash]: utilities.md#unord.hash
|
| 161 |
+
[utility.swap]: utilities.md#utility.swap
|
| 162 |
+
|
| 163 |
+
[^1]: If `eof()` can be held in `char_type` then some iostreams
|
| 164 |
+
operations may give surprising results.
|
| 165 |
+
|
| 166 |
+
[^2]: `Allocator::value_type` must name the same type as `charT` (
|
| 167 |
+
[[string.require]]).
|
| 168 |
+
|
| 169 |
+
[^3]: For example, as an argument to non-member functions `swap()` (
|
| 170 |
+
[[string.special]]), `operator>{}>()` ([[string.io]]), and
|
| 171 |
+
`getline()` ([[string.io]]), or as an argument to
|
| 172 |
+
`basic_string::swap()`.
|
| 173 |
+
|
| 174 |
+
[^4]: `reserve()` uses `allocator_traits<Allocator>::allocate()` which
|
| 175 |
+
may throw an appropriate exception.
|