61 lines
2.8 KiB
Markdown
61 lines
2.8 KiB
Markdown
[byte.strings]
|
||
|
||
# 16 Library introduction [[library]](./#library)
|
||
|
||
## 16.3 Method of description [[description]](description#byte.strings)
|
||
|
||
### 16.3.3 Other conventions [[conventions]](conventions#byte.strings)
|
||
|
||
#### 16.3.3.3 Type descriptions [[type.descriptions]](type.descriptions#byte.strings)
|
||
|
||
#### 16.3.3.3.4 Character sequences [[character.seq]](character.seq#byte.strings)
|
||
|
||
#### 16.3.3.3.4.2 Byte strings [byte.strings]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L788)
|
||
|
||
A [*null-terminated byte string*](#def:ntbs "16.3.3.3.4.2 Byte strings [byte.strings]"),
|
||
or ntbs,
|
||
is a character sequence whose highest-addressed element
|
||
with defined content has the value zero
|
||
(the [*terminating null character*](#def:character,terminating_null "16.3.3.3.4.2 Byte strings [byte.strings]"));
|
||
no other element in the sequence has the value zero[.](#1.sentence-1)[139](#footnote-139 "Many of the objects manipulated by function signatures declared in <cstring> are character sequences or ntbss. The size of some of these character sequences is limited by a length value, maintained separately from the character sequence.")
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L803)
|
||
|
||
The [*length of an ntbs*](#def:ntbs,length "16.3.3.3.4.2 Byte strings [byte.strings]") is the number of elements that
|
||
precede the terminating null character[.](#2.sentence-1)
|
||
|
||
An [*empty ntbs*](#def:ntbs,empty "16.3.3.3.4.2 Byte strings [byte.strings]") has a length of zero[.](#2.sentence-2)
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L810)
|
||
|
||
The [*value of an ntbs*](#def:ntbs,value "16.3.3.3.4.2 Byte strings [byte.strings]") is the sequence of values of the
|
||
elements up to and including the terminating null character[.](#3.sentence-1)
|
||
|
||
[4](#4)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L815)
|
||
|
||
A [*static ntbs*](#def:ntbs,static "16.3.3.3.4.2 Byte strings [byte.strings]") is an ntbs with
|
||
static storage duration[.](#4.sentence-1)[140](#footnote-140 "A string-literal, such as "abc", is a static ntbs.")
|
||
|
||
[139)](#footnote-139)[139)](#footnoteref-139)
|
||
|
||
Many of the objects manipulated by
|
||
function signatures declared in[<cstring>](cstring.syn#header:%3ccstring%3e "27.5.1 Header <cstring> synopsis [cstring.syn]") are character sequences or ntbss[.](#footnote-139.sentence-1)
|
||
|
||
The size of some of these character sequences is limited by
|
||
a length value, maintained separately from the character sequence[.](#footnote-139.sentence-2)
|
||
|
||
[140)](#footnote-140)[140)](#footnoteref-140)
|
||
|
||
A [*string-literal*](lex.string#nt:string-literal "5.13.5 String literals [lex.string]"), such as"abc",
|
||
is a static ntbs[.](#footnote-140.sentence-1)
|