### <aname="Rstr-zstring"></a>SL.str.3: Use `zstring` or `czstring` to refere to a C-style, zero-terminated, sequence of characters
##### Reason
Readability.
Statement of intent.
A plain `char*` can be a pointer to a single character, a pointer to an arry of characters, a pointer to a C-style (zero terminated) string, or event to a small integer.
Distinguishing these alternatives prevents misunderstandings and bugs.
##### Example
void f1(const char* s); // s is probably a string
All we know is that it is supposet ot bet the nullptr or point to at least one character
void f1(zstring s); // s is a C-style string or the nullptr
void f1(czstring s); // s is a C-style string that is not the nullptr
void f1(std::byte* s); // s is a pointer to a byte (C++17)
##### Note
Don't convert a C-style string to `string` unless there is a reason to.
##### Note
Linke any other "plain pointer", a `zstring` should not represent ownership.
##### Note
There are billions of lines of C++ "out there", most use `char*` and `const char*` without documenting intent.
They are use in a wide varity of ways, including to represent ownership and as generic pointers to memory (instead of `void*`).
It is hard to separate these uses, so this guideline is hard to follow.
This is one of the major sources of bugs in C and C++ programs, so it it worth while to follow this guideline wherever feasible..
##### Enforcement
* Flag uses of `[]` on a `char*`
* Flag uses of `delete` on a `char*`
* Flag uses of `free()` on a `char*`
### <aname="Rstr-char*"></a>SL.str.4: Use `char*` to refer to a single character
##### Reason
The variety of uses of `char*` in current code is a major source of errors.
##### Example, bad
char arr[] = {'a', 'b', 'c'};
void print(const char* p)
{
cout <<p<<'\n';
}
void use()
{
print(arr); // run-time error; potentially very bad
}
The array `arr` is not a C-style string because it is not zero-terminated.
##### Alternative
See [`zstring`](#Rstr-zstring), [`string`](#Rstr-string), and [`string_span`](#Rstr-view).
##### Enforcement
* Flag uses of `[]` on a `char*`
### <aname="Rstr-byte"></a>Sl.str.5: Use `std::byte` to refer to byte values that do not necessarily represent characters
##### Reason
Use of `char*` to represent a pinter to something that is not necessarily a character cause confusion
and disable valuable optimizations.
##### Example
???
##### Note
C++17
##### Enforcement
???
### <aname="Rstr-locale"></a>Sl.str.10: Use `std::string` when you need to perform locale-sensitive sting operations
##### Reason
`std::string` support standard-library [`locale` facilities](#Rstr-locale)
##### Example
???
##### Note
???
##### Enforcement
???
### <aname="Rstr-span"></a>Sl.str.11: Use `gsl::string_span` rather than `std::view` when you need to mutate a string
##### Reason
`std::string_view` is read-only.
##### Example
???
##### Note
???
##### Enforcement
The compile will flag attempts to write to a `string_view`.
### <aname="Rstr-s"></a>Sl.str.12: Use the `s` suffix for string literals meant to be standard-library `string`s
##### Reason
Direct expression of an idea minimizes mistakes.
##### Example
auto pp1 = make_pair("Tokyo",9.00); // {C-style string,double} intended?
pair<string,double> pp2 = {"Tokyo",9.00}; // a bit verbose
auto pp3 = make_pair("Tokyo"s,9.00); // {std::string,double} // C++17