![]() |
MOS Source Code
|
#include <string.hpp>
Public Member Functions | |
basic_string (std::nullptr_t)=delete | |
basic_string () | |
basic_string (const Char *buffer) | |
basic_string (const Char *buffer, size_t size) | |
template<class StringViewLike> | |
basic_string (const StringViewLike &view) | |
basic_string (size_t size, Char c=0) | |
basic_string (const basic_string &other) | |
basic_string (basic_string &&other) | |
~basic_string () | |
basic_string & | operator= (const Char *buffer) |
basic_string & | operator= (const mos::basic_string_view< Char > &view) |
basic_string & | operator= (basic_string &&other) |
basic_string & | operator= (const basic_string &other) |
void | resize (size_t new_length) |
bool | begins_with (Char c) const |
bool | begins_with (const basic_string_view< Char > &prefix) const |
bool | ends_with (Char c) const |
bool | ends_with (const basic_string_view< Char > &suffix) const |
void | clear () |
basic_string | operator+ (const basic_string &other) const |
basic_string | operator+ (Char c) const |
void | push_back (Char c) |
basic_string & | operator+= (const basic_string_view< Char > &other) |
basic_string & | operator+= (Char c) |
const Char * | data () const |
const Char * | c_str () const |
Char & | operator[] (size_t index) |
const Char & | operator[] (size_t index) const |
size_t | size () const |
bool | empty () const |
ssize_t | copy (Char *buffer, size_t size, size_t pos=0) const |
basic_string_view< Char > | value_or (basic_string_view< Char > other) const |
Char * | begin () |
const Char * | begin () const |
Char * | end () |
const Char * | end () const |
bool | operator== (const basic_string &other) const |
bool | operator== (const char *rhs) const |
operator basic_string_view< Char > () const | |
bool | operator== (std::nullptr_t) const =delete |
Static Public Attributes | |
static constexpr auto | npos = size_t(-1) |
Private Member Functions | |
void | _init (const Char *buffer, size_t size) |
int | _do_compare (const Char *other, const size_t other_size) const |
void | _convert_to_long (size_t new_length=0) |
void | _convert_to_short () |
Private Attributes | ||
bool | _is_long = false | |
size_t | _length | |
string length EXcluding null terminator | ||
union { | ||
struct _long_buffer { | ||
Char * _buffer | ||
size_t _capacity | ||
buffer capacity includes null terminator More... | ||
} _long | ||
struct _short_buffer { | ||
Char _buffer [short_string_capacity] | ||
} _short | ||
} | _data | |
Friends | |
basic_string | operator+ (const basic_string_view< Char > &lhs, const basic_string &rhs) |
Definition at line 15 of file string.hpp.
|
delete |
|
inline |
Definition at line 40 of file string.hpp.
Referenced by basic_string< char >::operator+.
|
inline |
Definition at line 42 of file string.hpp.
|
inlineexplicit |
Definition at line 47 of file string.hpp.
|
inlineexplicit |
Definition at line 53 of file string.hpp.
|
inline |
Definition at line 58 of file string.hpp.
|
inline |
Definition at line 63 of file string.hpp.
|
inline |
Definition at line 68 of file string.hpp.
|
inline |
Definition at line 85 of file string.hpp.
Referenced by basic_string< char >::operator=(), basic_string< char >::operator=(), and basic_string< char >::operator=().
|
inline |
Definition at line 91 of file string.hpp.
|
inline |
Definition at line 113 of file string.hpp.
|
inline |
Definition at line 133 of file string.hpp.
|
inline |
Definition at line 152 of file string.hpp.
|
inline |
Definition at line 163 of file string.hpp.
Referenced by dentry_resolve_lastseg().
|
inline |
Definition at line 174 of file string.hpp.
|
inline |
Definition at line 181 of file string.hpp.
|
inline |
Definition at line 188 of file string.hpp.
Referenced by dentry_resolve_lastseg().
|
inline |
Definition at line 195 of file string.hpp.
|
inline |
Definition at line 202 of file string.hpp.
|
inline |
Definition at line 213 of file string.hpp.
|
inline |
Definition at line 219 of file string.hpp.
|
inline |
Definition at line 224 of file string.hpp.
|
inline |
Definition at line 229 of file string.hpp.
Referenced by basic_string< char >::operator+=(), and basic_string< char >::push_back().
|
inline |
Definition at line 249 of file string.hpp.
|
inline |
Definition at line 254 of file string.hpp.
Referenced by basic_string< char >::_do_compare(), basic_string< char >::basic_string(), basic_string< char >::begins_with(), basic_string< char >::c_str(), basic_string< char >::copy(), basic_string< char >::ends_with(), MOS_STATIC_ASSERT(), operator basic_string_view< Char >(), basic_string< char >::operator=(), basic_string< char >::operator==(), and vsnprintf_do_pointer_kernel().
|
inline |
Definition at line 259 of file string.hpp.
Referenced by elf_create_process(), sysfs_register_file(), userfs_ensure_connected(), userfs_fsop_mount(), vfs_mount(), and vfs_register_filesystem().
|
inline |
Definition at line 264 of file string.hpp.
|
inline |
Definition at line 269 of file string.hpp.
|
inline |
Definition at line 274 of file string.hpp.
Referenced by basic_string< char >::basic_string(), dentry_resolve_lastseg(), basic_string< char >::operator=(), and basic_string< char >::operator==().
|
inline |
Definition at line 279 of file string.hpp.
Referenced by dentry_check_refstat(), dentry_mount(), dentry_path(), dentry_root_get_mountpoint(), dentry_unref_one_norelease(), sysfs_register_file(), basic_string< char >::value_or(), and vsnprintf_do_pointer_kernel().
|
inline |
Definition at line 284 of file string.hpp.
|
inline |
Definition at line 294 of file string.hpp.
Referenced by FsBaseFile::name(), Process::operator<<, and Thread::operator<<.
|
inline |
Definition at line 299 of file string.hpp.
|
inline |
Definition at line 303 of file string.hpp.
|
inline |
Definition at line 308 of file string.hpp.
|
inline |
Definition at line 312 of file string.hpp.
|
inline |
Definition at line 317 of file string.hpp.
|
inline |
Definition at line 322 of file string.hpp.
|
inline |
|
delete |
|
inlineprivate |
Definition at line 335 of file string.hpp.
Referenced by basic_string< char >::basic_string(), basic_string< char >::basic_string(), basic_string< char >::basic_string(), basic_string< char >::basic_string(), basic_string< char >::basic_string(), and basic_string< char >::operator=().
|
inlineprivate |
Definition at line 356 of file string.hpp.
Referenced by basic_string< char >::operator==(), and basic_string< char >::operator==().
|
inlineprivate |
Definition at line 364 of file string.hpp.
Referenced by basic_string< char >::operator+=(), and basic_string< char >::resize().
|
inlineprivate |
Definition at line 379 of file string.hpp.
Referenced by basic_string< char >::resize().
|
friend |
Definition at line 158 of file string.hpp.
Referenced by basic_string< char >::operator+().
|
private |
Definition at line 17 of file string.hpp.
|
private |
string length EXcluding null terminator
Definition at line 18 of file string.hpp.
Referenced by operator basic_string_view< Char >().
Char* _buffer |
Definition at line 24 of file string.hpp.
size_t _capacity |
buffer capacity includes null terminator
Definition at line 25 of file string.hpp.
struct { ... } ::_long_buffer _long |
Char _buffer[short_string_capacity] |
Definition at line 30 of file string.hpp.
struct { ... } ::_short_buffer _short |
union { ... } _data |
|
staticconstexpr |
Definition at line 35 of file string.hpp.