P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::StringRef Struct Reference

Classes

class  Split
 

Public Member Functions

 StringRef (const char *str)
 
 StringRef (const char *str, size_t l)
 
 StringRef (const std::string &str)
 
 StringRef (const StringRef &a)
 
 StringRef (cstring str)
 
StringRef after (const char *s) const
 
StringRef before (const char *s) const
 
const char * begin () const
 
void clear ()
 
int compare (const char *a) const
 
int compare (const std::string &a) const
 
int compare (const StringRef &a) const
 
int compare (cstring a) const
 
const char * end () const
 
const char * find (char ch) const
 
const char * find (const char *set) const
 
const char * findlast (char ch) const
 
const char * findstr (StringRef sub)
 
bool isNullOrEmpty () const
 
 operator bool () const
 
 operator cstring () const
 
 operator std::string () const
 
bool operator!= (const StringRef &a) const
 
template<class T >
bool operator!= (T a) const
 
char operator* () const
 
StringRef operator+ (size_t i) const
 
StringRefoperator++ ()
 
StringRef operator++ (int)
 
StringRefoperator+= (size_t i)
 
StringRefoperator-- ()
 
StringRef operator-- (int)
 
template<class T >
bool operator< (T a) const
 
template<class T >
bool operator<= (T a) const
 
StringRefoperator= (const StringRef &a)
 
bool operator== (const char *a) const
 
bool operator== (const std::string &a) const
 
bool operator== (const StringRef &a) const
 
bool operator== (cstring a) const
 
template<class T >
bool operator> (T a) const
 
template<class T >
bool operator>= (T a) const
 
char operator[] (size_t i) const
 
Split split (char) const
 
Split split (const char *) const
 
std::string string () const
 
StringRef substr (size_t start, size_t length) const
 
cstring toString () const
 
StringReftrim (const char *white=" \t\r\n")
 
StringRef trim (const char *white=" \t\r\n") const
 
bool trimCR ()
 

Public Attributes

size_t len
 
const char * p