String literal wrapper. More...
#include </home/chochlik/devel/oglplus/include/oglplus/string.hpp>
Public Types | |
typedef const GLchar * | iterator |
character iterator | |
typedef const GLchar * | const_iterator |
character iterator | |
Public Member Functions | |
StrLit (void) | |
Default constructor. | |
StrLit (std::nullptr_t) | |
Construction from nullptr. | |
StrLit (const GLchar *literal) | |
Construction from a c-string literal . More... | |
StrLit (const GLchar *lit, std::size_t lit_size) | |
Construction from a c-string and a length. More... | |
String | str (void) const |
Efficient conversion to String. | |
const GLchar * | c_str (void) const |
Returns the c-string literal. | |
std::size_t | size (void) const |
Returns the size (in GLchars) of the literal. | |
bool | empty (void) const |
Returns true if the literal is empty. | |
const_iterator | begin (void) const |
returns a const iterator to the first character in the literal | |
const_iterator | end (void) const |
returns a const iterator past the last character in the literal | |
operator bool (void) const | |
Equivalent to !empty () | |
bool | operator! (void) const |
Equivalent to the empty() function. | |
Friends | |
const_iterator | begin (const StrLit &strlit) |
returns a const iterator to the first character in the literal | |
const_iterator | end (const StrLit &strlit) |
returns a const iterator past the last character in the literal | |
Unspecified | operator+ (StrLit a, StrLit b) |
Literal concatenation operator. More... | |
String literal wrapper.
The literal optionally checks the source c-string literal for UTF-8 validity (which is required by the OpenGL specification for input string parameters of GL functions).
|
explicit |
Construction from a c-string literal
.
The input literal
can be optionally checked for UTF-8 validity.
|
explicit |
Construction from a c-string and
a length.
The input literal
can be optionally checked for UTF-8 validity.
|
friend |
Literal concatenation operator.
Returns an unspecified type explicitly convertible to String