- tmp/tmpbn6qk6fr/{from.md → to.md} +152 -29
tmp/tmpbn6qk6fr/{from.md → to.md}
RENAMED
|
@@ -1,55 +1,178 @@
|
|
| 1 |
### Header `<cstring>` synopsis <a id="cstring.syn">[[cstring.syn]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
|
|
|
|
|
|
| 4 |
namespace std {
|
| 5 |
-
using size_t = see [support.types.layout];
|
| 6 |
|
| 7 |
-
void* memcpy(void* s1, const void* s2, size_t n);
|
| 8 |
-
void*
|
| 9 |
-
|
| 10 |
-
char*
|
| 11 |
-
char*
|
| 12 |
-
char*
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
| 15 |
int strcoll(const char* s1, const char* s2);
|
| 16 |
-
int strncmp(const char* s1, const char* s2, size_t n);
|
| 17 |
size_t strxfrm(char* s1, const char* s2, size_t n);
|
| 18 |
-
const void* memchr(const void* s, int c, size_t n);
|
| 19 |
-
void* memchr(void* s, int c, size_t n);
|
| 20 |
-
const char* strchr(const char* s, int c);
|
| 21 |
-
char* strchr(char* s, int c);
|
| 22 |
-
size_t strcspn(const char* s1, const char* s2);
|
| 23 |
-
const char* strpbrk(const char* s1, const char* s2);
|
| 24 |
-
char* strpbrk(char* s1, const char* s2);
|
| 25 |
-
const char* strrchr(const char* s, int c);
|
| 26 |
-
char* strrchr(char* s, int c);
|
| 27 |
-
size_t strspn(const char* s1, const char* s2);
|
| 28 |
-
const char* strstr(const char* s1, const char* s2);
|
| 29 |
-
char* strstr(char* s1, const char* s2);
|
| 30 |
char* strtok(char* s1, const char* s2);
|
| 31 |
-
void* memset(void* s, int c, size_t n);
|
|
|
|
| 32 |
char* strerror(int errnum);
|
| 33 |
-
size_t strlen(const char* s);
|
| 34 |
}
|
| 35 |
|
| 36 |
-
#define NULL see [support.types.nullptr]
|
| 37 |
```
|
| 38 |
|
| 39 |
The contents and meaning of the header `<cstring>` are the same as the C
|
| 40 |
standard library header `<string.h>`.
|
| 41 |
|
| 42 |
The functions `strerror` and `strtok` are not required to avoid data
|
| 43 |
races [[res.on.data.races]].
|
| 44 |
|
| 45 |
The functions `memcpy` and `memmove` are signal-safe [[support.signal]].
|
| 46 |
-
|
| 47 |
-
destination region of storage immediately prior to copying the
|
| 48 |
-
of characters to the destination.
|
|
|
|
|
|
|
| 49 |
|
| 50 |
[*Note 1*: The functions `strchr`, `strpbrk`, `strrchr`, `strstr`, and
|
| 51 |
`memchr`, have different signatures in this document, but they have the
|
| 52 |
same behavior as in the C standard library [[library.c]]. — *end note*]
|
| 53 |
|
| 54 |
-
See also: ISO C 7.
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
### Header `<cstring>` synopsis <a id="cstring.syn">[[cstring.syn]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
#define __STDC_VERSION_STRING_H__ 202311L
|
| 5 |
+
|
| 6 |
namespace std {
|
| 7 |
+
using size_t = see [support.types.layout]; // freestanding
|
| 8 |
|
| 9 |
+
void* memcpy(void* s1, const void* s2, size_t n); // freestanding
|
| 10 |
+
void* memccpy(void* s1, const void* s2, int c, size_t n); // freestanding
|
| 11 |
+
void* memmove(void* s1, const void* s2, size_t n); // freestanding
|
| 12 |
+
char* strcpy(char* s1, const char* s2); // freestanding
|
| 13 |
+
char* strncpy(char* s1, const char* s2, size_t n); // freestanding
|
| 14 |
+
char* strdup(const char* s);
|
| 15 |
+
char* strndup(const char* s, size_t size);
|
| 16 |
+
char* strcat(char* s1, const char* s2); // freestanding
|
| 17 |
+
char* strncat(char* s1, const char* s2, size_t n); // freestanding
|
| 18 |
+
int memcmp(const void* s1, const void* s2, size_t n); // freestanding
|
| 19 |
+
int strcmp(const char* s1, const char* s2); // freestanding
|
| 20 |
int strcoll(const char* s1, const char* s2);
|
| 21 |
+
int strncmp(const char* s1, const char* s2, size_t n); // freestanding
|
| 22 |
size_t strxfrm(char* s1, const char* s2, size_t n);
|
| 23 |
+
const void* memchr(const void* s, int c, size_t n); // freestanding; see [library.c]
|
| 24 |
+
void* memchr(void* s, int c, size_t n); // freestanding; see [library.c]
|
| 25 |
+
const char* strchr(const char* s, int c); // freestanding; see [library.c]
|
| 26 |
+
char* strchr(char* s, int c); // freestanding; see [library.c]
|
| 27 |
+
size_t strcspn(const char* s1, const char* s2); // freestanding
|
| 28 |
+
const char* strpbrk(const char* s1, const char* s2); // freestanding; see [library.c]
|
| 29 |
+
char* strpbrk(char* s1, const char* s2); // freestanding; see [library.c]
|
| 30 |
+
const char* strrchr(const char* s, int c); // freestanding; see [library.c]
|
| 31 |
+
char* strrchr(char* s, int c); // freestanding; see [library.c]
|
| 32 |
+
size_t strspn(const char* s1, const char* s2); // freestanding
|
| 33 |
+
const char* strstr(const char* s1, const char* s2); // freestanding; see [library.c]
|
| 34 |
+
char* strstr(char* s1, const char* s2); // freestanding; see [library.c]
|
| 35 |
char* strtok(char* s1, const char* s2);
|
| 36 |
+
void* memset(void* s, int c, size_t n); // freestanding
|
| 37 |
+
void* memset_explicit(void* s, int c, size_t n); // freestanding
|
| 38 |
char* strerror(int errnum);
|
| 39 |
+
size_t strlen(const char* s); // freestanding
|
| 40 |
}
|
| 41 |
|
| 42 |
+
#define NULL see [support.types.nullptr] // freestanding
|
| 43 |
```
|
| 44 |
|
| 45 |
The contents and meaning of the header `<cstring>` are the same as the C
|
| 46 |
standard library header `<string.h>`.
|
| 47 |
|
| 48 |
The functions `strerror` and `strtok` are not required to avoid data
|
| 49 |
races [[res.on.data.races]].
|
| 50 |
|
| 51 |
The functions `memcpy` and `memmove` are signal-safe [[support.signal]].
|
| 52 |
+
Each of these functions implicitly creates objects [[intro.object]] in
|
| 53 |
+
the destination region of storage immediately prior to copying the
|
| 54 |
+
sequence of characters to the destination. Each of these functions
|
| 55 |
+
returns a pointer to a suitable created object, if any, otherwise the
|
| 56 |
+
value of the first parameter.
|
| 57 |
|
| 58 |
[*Note 1*: The functions `strchr`, `strpbrk`, `strrchr`, `strstr`, and
|
| 59 |
`memchr`, have different signatures in this document, but they have the
|
| 60 |
same behavior as in the C standard library [[library.c]]. — *end note*]
|
| 61 |
|
| 62 |
+
See also: ISO C 7.26
|
| 63 |
|
| 64 |
+
<!-- Link reference definitions -->
|
| 65 |
+
[basic.indet]: basic.md#basic.indet
|
| 66 |
+
[basic.string]: #basic.string
|
| 67 |
+
[basic.string.general]: #basic.string.general
|
| 68 |
+
[basic.string.hash]: #basic.string.hash
|
| 69 |
+
[basic.string.literals]: #basic.string.literals
|
| 70 |
+
[c.strings]: #c.strings
|
| 71 |
+
[char.traits]: #char.traits
|
| 72 |
+
[char.traits.general]: #char.traits.general
|
| 73 |
+
[char.traits.req]: #char.traits.req
|
| 74 |
+
[char.traits.require]: #char.traits.require
|
| 75 |
+
[char.traits.specializations]: #char.traits.specializations
|
| 76 |
+
[char.traits.specializations.char]: #char.traits.specializations.char
|
| 77 |
+
[char.traits.specializations.char16.t]: #char.traits.specializations.char16.t
|
| 78 |
+
[char.traits.specializations.char32.t]: #char.traits.specializations.char32.t
|
| 79 |
+
[char.traits.specializations.char8.t]: #char.traits.specializations.char8.t
|
| 80 |
+
[char.traits.specializations.general]: #char.traits.specializations.general
|
| 81 |
+
[char.traits.specializations.wchar.t]: #char.traits.specializations.wchar.t
|
| 82 |
+
[char.traits.typedefs]: #char.traits.typedefs
|
| 83 |
+
[cmp.categories]: support.md#cmp.categories
|
| 84 |
+
[container.alloc.reqmts]: containers.md#container.alloc.reqmts
|
| 85 |
+
[container.reqmts]: containers.md#container.reqmts
|
| 86 |
+
[container.requirements]: containers.md#container.requirements
|
| 87 |
+
[container.requirements.pre]: containers.md#container.requirements.pre
|
| 88 |
+
[cpp17.copyassignable]: #cpp17.copyassignable
|
| 89 |
+
[cpp17.copyconstructible]: #cpp17.copyconstructible
|
| 90 |
+
[cpp17.defaultconstructible]: #cpp17.defaultconstructible
|
| 91 |
+
[cpp17.destructible]: #cpp17.destructible
|
| 92 |
+
[cstring.syn]: #cstring.syn
|
| 93 |
+
[defns.character.container]: intro.md#defns.character.container
|
| 94 |
+
[input.output]: input.md#input.output
|
| 95 |
+
[intro.object]: basic.md#intro.object
|
| 96 |
+
[iostream.forward]: input.md#iostream.forward
|
| 97 |
+
[iostreams.limits.pos]: input.md#iostreams.limits.pos
|
| 98 |
+
[istream.formatted.reqmts]: input.md#istream.formatted.reqmts
|
| 99 |
+
[istream.unformatted]: input.md#istream.unformatted
|
| 100 |
+
[iterator.concept.contiguous]: iterators.md#iterator.concept.contiguous
|
| 101 |
+
[iterator.concept.winc]: iterators.md#iterator.concept.winc
|
| 102 |
+
[iterator.range]: iterators.md#iterator.range
|
| 103 |
+
[iterator.requirements.general]: iterators.md#iterator.requirements.general
|
| 104 |
+
[library.c]: library.md#library.c
|
| 105 |
+
[ostream.formatted.reqmts]: input.md#ostream.formatted.reqmts
|
| 106 |
+
[over.match.oper]: over.md#over.match.oper
|
| 107 |
+
[random.access.iterators]: iterators.md#random.access.iterators
|
| 108 |
+
[res.on.data.races]: library.md#res.on.data.races
|
| 109 |
+
[sequence.reqmts]: containers.md#sequence.reqmts
|
| 110 |
+
[string.access]: #string.access
|
| 111 |
+
[string.accessors]: #string.accessors
|
| 112 |
+
[string.append]: #string.append
|
| 113 |
+
[string.assign]: #string.assign
|
| 114 |
+
[string.capacity]: #string.capacity
|
| 115 |
+
[string.classes]: #string.classes
|
| 116 |
+
[string.classes.general]: #string.classes.general
|
| 117 |
+
[string.cmp]: #string.cmp
|
| 118 |
+
[string.compare]: #string.compare
|
| 119 |
+
[string.cons]: #string.cons
|
| 120 |
+
[string.contains]: #string.contains
|
| 121 |
+
[string.conversions]: #string.conversions
|
| 122 |
+
[string.copy]: #string.copy
|
| 123 |
+
[string.ends.with]: #string.ends.with
|
| 124 |
+
[string.erase]: #string.erase
|
| 125 |
+
[string.erasure]: #string.erasure
|
| 126 |
+
[string.find]: #string.find
|
| 127 |
+
[string.insert]: #string.insert
|
| 128 |
+
[string.io]: #string.io
|
| 129 |
+
[string.iterators]: #string.iterators
|
| 130 |
+
[string.modifiers]: #string.modifiers
|
| 131 |
+
[string.nonmembers]: #string.nonmembers
|
| 132 |
+
[string.op.append]: #string.op.append
|
| 133 |
+
[string.op.plus]: #string.op.plus
|
| 134 |
+
[string.ops]: #string.ops
|
| 135 |
+
[string.replace]: #string.replace
|
| 136 |
+
[string.require]: #string.require
|
| 137 |
+
[string.special]: #string.special
|
| 138 |
+
[string.starts.with]: #string.starts.with
|
| 139 |
+
[string.substr]: #string.substr
|
| 140 |
+
[string.swap]: #string.swap
|
| 141 |
+
[string.syn]: #string.syn
|
| 142 |
+
[string.view]: #string.view
|
| 143 |
+
[string.view.access]: #string.view.access
|
| 144 |
+
[string.view.capacity]: #string.view.capacity
|
| 145 |
+
[string.view.compare]: #string.view.compare
|
| 146 |
+
[string.view.comparison]: #string.view.comparison
|
| 147 |
+
[string.view.cons]: #string.view.cons
|
| 148 |
+
[string.view.deduct]: #string.view.deduct
|
| 149 |
+
[string.view.find]: #string.view.find
|
| 150 |
+
[string.view.general]: #string.view.general
|
| 151 |
+
[string.view.hash]: #string.view.hash
|
| 152 |
+
[string.view.io]: #string.view.io
|
| 153 |
+
[string.view.iterators]: #string.view.iterators
|
| 154 |
+
[string.view.literals]: #string.view.literals
|
| 155 |
+
[string.view.modifiers]: #string.view.modifiers
|
| 156 |
+
[string.view.ops]: #string.view.ops
|
| 157 |
+
[string.view.synop]: #string.view.synop
|
| 158 |
+
[string.view.template]: #string.view.template
|
| 159 |
+
[string.view.template.general]: #string.view.template.general
|
| 160 |
+
[strings]: #strings
|
| 161 |
+
[strings.general]: #strings.general
|
| 162 |
+
[strings.summary]: #strings.summary
|
| 163 |
+
[support.signal]: support.md#support.signal
|
| 164 |
+
[temp.deduct]: temp.md#temp.deduct
|
| 165 |
+
[term.standard.layout.type]: basic.md#term.standard.layout.type
|
| 166 |
+
[term.trivially.copyable.type]: basic.md#term.trivially.copyable.type
|
| 167 |
+
[unord.hash]: utilities.md#unord.hash
|
| 168 |
+
[utility.swap]: utilities.md#utility.swap
|
| 169 |
+
|
| 170 |
+
[^1]: If `eof()` can be held in `char_type` then some iostreams
|
| 171 |
+
operations can give surprising results.
|
| 172 |
+
|
| 173 |
+
[^2]: Because `basic_string_view` refers to a constant sequence,
|
| 174 |
+
`iterator` and `const_iterator` are the same type.
|
| 175 |
+
|
| 176 |
+
[^3]: For example, as an argument to non-member functions `swap()`
|
| 177 |
+
[[string.special]], `operator>{}>()` [[string.io]], and `getline()`
|
| 178 |
+
[[string.io]], or as an argument to `basic_string::swap()`.
|