GCC Middle and Back End API Reference
|
#include <vec.h>
Public Types | |
using | value_type |
using | iterator |
using | const_iterator |
Public Member Functions | |
string_slice () | |
string_slice (const char *str) | |
string_slice (const char *str, size_t len) | |
string_slice (const char *start, const char *end) | |
string_slice | strip () |
iterator | begin () |
iterator | end () |
value_type & | front () |
value_type & | back () |
value_type & | operator[] (unsigned int i) |
unsigned | size () const |
size_t | size_bytes () const |
bool | empty () const |
bool | is_valid () const |
Static Public Member Functions | |
static string_slice | invalid () |
static string_slice | tokenize (string_slice *str, string_slice delims) |
static int | strcmp (string_slice str1, string_slice str2) |
Private Attributes | |
iterator | m_base |
unsigned int | m_size |
Friends | |
bool | operator== (const string_slice &lhs, const string_slice &rhs) |
bool | operator!= (const string_slice &lhs, const string_slice &rhs) |
string_slice inherits from array_slice, specifically to refer to a substring of a character array. It includes some string like helpers.
|
inherited |
|
inherited |
|
inherited |
|
inline |
References array_slice< const char >::array_slice.
Referenced by invalid(), operator!=, operator==, strcmp(), strip(), and tokenize().
|
inline |
References array_slice< const char >::array_slice.
|
inlineexplicit |
References array_slice< const char >::array_slice.
|
inlineexplicit |
References array_slice< const char >::array_slice, and array_slice< const char >::end().
|
inlineinherited |
|
inlineinherited |
Referenced by string_slice::strip().
|
inlineinherited |
|
inlineinherited |
Referenced by string_slice::string_slice(), and string_slice::strip().
|
inlineinherited |
|
inlinestatic |
References string_slice().
Referenced by get_target_version(), and tokenize().
|
inlineinherited |
|
inlineinherited |
References i.
|
inlineinherited |
|
inlineinherited |
|
static |
Compares the string_slices STR1 and STR2 giving a lexograpical ordering. Returns -1 if STR1 comes before STR2, 1 if STR1 comes after, and 0 if the string_slices have the same contents.
References i, array_slice< T >::size(), and string_slice().
string_slice string_slice::strip | ( | ) |
References array_slice< const char >::begin(), array_slice< const char >::end(), and string_slice().
Referenced by get_clone_attr_versions(), and get_target_version().
|
static |
Gets the next token from STR delimited by DELIMS (deliminator not included in returned string). Updates STR to be the remaining string after the given token. STR and DELIMS must both be valid string_slices. If there aren't any of the chars in DELIM in STR (ie no more tokens in STR) then returns the string, and updates STR to be invalid.
References array_slice< T >::begin(), array_slice< T >::end(), gcc_assert, invalid(), array_slice< T >::is_valid(), and string_slice().
Referenced by get_clone_attr_versions().
|
friend |
References string_slice().
|
friend |
References string_slice().
|
privateinherited |
|
privateinherited |