![]() |
Spicy
|
#include <string.h>
Public Types | |
| using | S = std::string |
Public Member Functions | |
| String ()=default | |
| String (std::string_view s) | |
| String (const String &)=default | |
| String (String &&)=default | |
| String & | operator= (std::string_view sv) |
| String & | operator= (const String &)=default |
| String & | operator= (String &&)=default |
| auto | str () const |
| operator std::string_view () const | |
| String & | operator+= (const String &b) |
| String & | operator+= (std::string_view b) |
Friends | |
| bool | operator== (const String &a, const String &b) |
| bool | operator== (const String &a, std::string_view b) |
| bool | operator== (const String &a, const char *b) |
| bool | operator< (const String &a, const String &b) |
| bool | operator< (const String &a, std::string_view b) |
| bool | operator< (const String &a, const char *b) |
| String | operator+ (const String &a, const String &b) |
| String | operator+ (const String &a, std::string_view b) |
HILTI's string is a std::string-like type for wrapping raw bytes with additional safety guarantees.
If not otherwise specified, member functions have the semantics of std::string member functions. Note, however, that by design this type does not convert to/from std::string to avoid mixing up the two accidentally in runtime code. Instead, std::string_view can serve as a go-between type for conversions.
|
default |
Creates an empty string.
|
inline |
Creates a string from a standard string view.
|
inline |
Implicitly converts the string to a standard string view.
Returns a substring of the string.
| pos | the position of the first character to include in the substring |
| count | the number of characters to include in the substring, or npos to include all characters until the end of the string |
|
inline |
Returns the string's data as a standard string view.