L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4Re::Util::Names::Name Class Reference

Name class. More...

#include <name_space_svr>

+ Inheritance diagram for L4Re::Util::Names::Name:
+ Collaboration diagram for L4Re::Util::Names::Name:

Additional Inherited Members

- Public Types inherited from cxx::String
typedef char const * Index
 Character index type.
 
- Public Member Functions inherited from cxx::String
 String (char const *s) noexcept
 Initialize from a zero-terminated string.
 
 String (char const *s, unsigned long len) noexcept
 Initialize from a pointer to first character and a length.
 
 String (char const *s, char const *e) noexcept
 Initialize with start and end pointer.
 
 String ()
 Zero-initialize. Create an invalid string.
 
Index start () const
 Pointer to first character.
 
Index end () const
 Pointer to first byte behind the string.
 
int len () const
 Length.
 
void start (char const *s)
 Set start.
 
void len (unsigned long len)
 Set length.
 
bool empty () const
 Check if the string has length zero.
 
String head (Index end) const
 Return prefix up to index.
 
String head (unsigned long end) const
 Prefix of length end.
 
String substr (unsigned long idx, unsigned long len=~0UL) const
 Substring of length len starting at idx.
 
String substr (char const *start, unsigned long len=0) const
 Substring of length len starting at start.
 
template<typename F >
char const * find_match (F &&match) const
 Find matching character. match should be a function such as isspace.
 
char const * find (char const *c) const
 Find character. Return end() if not found.
 
char const * find (int c) const
 Find character. Return end() if not found.
 
char const * rfind (char const *c) const
 Find right-most character. Return end() if not found.
 
Index starts_with (cxx::String const &c) const
 Check if c is a prefix of string.
 
char const * find (int c, char const *s) const
 Find character c starting at position s. Return end() if not found.
 
char const * find (char const *c, char const *s) const
 Find character set at position.
 
char const & operator[] (unsigned long idx) const
 Get character at idx.
 
char const & operator[] (int idx) const
 Get character at idx.
 
char const & operator[] (Index idx) const
 Get character at idx.
 
bool eof (char const *s) const
 Check if pointer s points behind string.
 
template<typename INT >
int from_dec (INT *v) const
 Convert decimal string to integer.
 
template<typename INT >
int from_hex (INT *v) const
 Convert hex string to integer.
 
bool operator== (String const &o) const
 Equality.
 
bool operator!= (String const &o) const
 Inequality.
 

Detailed Description

Name class.

Definition at line 39 of file name_space_svr.


The documentation for this class was generated from the following file: