Tomographer
v1.0a
Tomographer C++ Framework Documentation
|
A constexpr
string type.
More...
#include <tomographer/tools/conststr.h>
Public Member Functions | |
template<std::size_t N> | |
constexpr | conststr (const char(&a)[N]) |
constexpr | conststr (const char *a, std::size_t n) |
constexpr char | operator[] (std::size_t n) const |
constexpr std::size_t | size () const |
constexpr bool | is_in_range (std::size_t n) const |
constexpr bool | check_range (std::size_t n, bool answer=true) const |
constexpr std::size_t | clamp_to_range (const std::size_t pos) const |
constexpr bool | startswith (const conststr &s, std::size_t StartOffset=0, std::size_t S_I=0) const |
constexpr bool | operator== (const conststr &other) const |
constexpr conststr | substr (std::size_t pos, std::size_t count=std::string::npos) const |
constexpr conststr | substr_e (std::size_t pos, std::size_t end=std::string::npos) const |
constexpr std::size_t | find (const conststr &s, std::size_t pos=0, std::size_t not_found=std::string::npos) const |
constexpr std::size_t | rfind (const conststr &s, std::size_t pos=std::string::npos, std::size_t not_found=std::string::npos) const |
std::string | to_string () const |
A constexpr
string type.
This type supports compile time indexing, range checking, startswith(), find(), substr() and friends.
Currently, I've found no way to do compile-time string concatenation. Please tell me if you have a good idea.
Definition at line 54 of file conststr.h.