AndroMeta  2.0.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
Meta::MStr Class Reference

Extends the standard string type, adding some useful convenience methods. More...

#include <MStr.h>

List of all members.

Public Types

typedef std::string::iterator iterator
typedef std::string::const_iterator const_iterator
typedef
std::string::reverse_iterator 
reverse_iterator
typedef
std::string::const_reverse_iterator 
const_reverse_iterator

Public Member Functions

 MStr (const std::string &str)
 MStr (const char *s)
bool operator!= (const MStr &str) const
bool operator== (const MStr &str) const
MStroperator= (const MStr &str)
bool operator< (const MStr &str) const
bool operator> (const MStr &str) const
bool operator<= (const MStr &str) const
bool operator>= (const MStr &str) const
MStr operator+ (const MStr &str) const
MStroperator+= (const MStr &str)
MStroperator+= (char c)
const char & operator[] (size_t pos) const
char & operator[] (size_t pos)
const char & at (size_t pos) const
char & at (size_t pos)
MStrappend (const MStr &str)
MStrappend (const MStr &str, size_t pos, size_t n)
MStrappend (const char *s, size_t n)
MStrappend (const char *s)
MStrappend (size_t n, char c)
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
MStrinsert (size_t pos1, const MStr &str)
MStrinsert (size_t pos1, const MStr &str, size_t pos2, size_t n)
MStrinsert (size_t pos1, const char *s, size_t n)
MStrinsert (size_t pos1, const char *s)
MStrinsert (size_t pos1, size_t n, char c)
iterator insert (iterator p, char c)
void insert (iterator p, size_t n, char c)
template<class InputIterator >
void insert (iterator p, InputIterator first, InputIterator last)
size_t copy (char *s, size_t n, size_t pos=0) const
template<class InputIterator >
MStrappend (InputIterator first, InputIterator last)
MStr substr (size_t pos=0, size_t n=std::string::npos) const
const char * c_str () const
const char * cstr () const
size_t find (const MStr &str, size_t pos=0) const
size_t find (const char *s, size_t pos, size_t n) const
size_t find (const char *s, size_t pos=0) const
size_t find (char c, size_t pos=0) const
size_t rfind (const MStr &str, size_t pos=npos) const
size_t rfind (const char *s, size_t pos, size_t n) const
size_t rfind (const char *s, size_t pos=npos) const
size_t rfind (char c, size_t pos=npos) const
size_t findReplace (const MStr &value, const MStr &replacement, bool all=true, size_t pos=0)
size_t findCount (const MStr &str) const
 operator std::string () const
std::string & str ()
const std::string & str () const
size_t length () const
void resize (size_t n, char c)
void resize (size_t n)
size_t size () const
size_t max_size () const
size_t maxSize () const
size_t capacity () const
void reserve (size_t res_arg=0)
void clear ()
MStrerase (size_t pos=0, size_t n=npos)
MStrreplace (size_t pos1, size_t n1, const MStr &str)
MStr allCaps () const
MStr allLower () const
MStr uppercase () const
MStr lowercase () const
void strip (bool start=true, bool end=true)
MStr quote () const
bool isIdentifier () const
bool isAllCapsIdentifier () const
bool isNumeric () const
bool empty () const
void convertEscapes ()
template<typename T >
void split (T &out, const MStr &delimiter, int maxTokens=-1) const
void push_back (char c)
void pushBack (char c)
MStrassign (const MStr &str)
MStrassign (const MStr &str, size_t pos, size_t n)
MStrassign (const char *s, size_t n)
MStrassign (const char *s)
MStrassign (size_t n, char c)
template<class InputIterator >
MStrassign (InputIterator first, InputIterator last)
void swap (MStr &str)
const char * data () const
std::allocator< char > get_allocator () const
size_t find_first_of (const MStr &str, size_t pos=0) const
size_t findFirstOf (const MStr &str, size_t pos=0) const
size_t find_first_of (const char *s, size_t pos, size_t n) const
size_t findFirstOf (const char *s, size_t pos, size_t n) const
size_t find_first_of (const char *s, size_t pos=0) const
size_t findFirstOf (const char *s, size_t pos=0) const
size_t find_first_of (char c, size_t pos=0) const
size_t findFirstOf (char c, size_t pos=0) const
size_t find_last_of (const MStr &str, size_t pos=npos) const
size_t findLastOf (const MStr &str, size_t pos=npos) const
size_t find_last_of (const char *s, size_t pos, size_t n) const
size_t findLastOf (const char *s, size_t pos, size_t n) const
size_t find_last_of (const char *s, size_t pos=npos) const
size_t findLastOf (const char *s, size_t pos=npos) const
size_t find_last_of (char c, size_t pos=npos) const
size_t findLastOf (char c, size_t pos=npos) const
size_t find_first_not_of (const MStr &str, size_t pos=0) const
size_t findFirstNotOf (const MStr &str, size_t pos=0) const
size_t find_first_not_of (const char *s, size_t pos, size_t n) const
size_t findFirstNotOf (const char *s, size_t pos, size_t n) const
size_t find_first_not_of (const char *s, size_t pos=0) const
size_t findFirstNotOf (const char *s, size_t pos=0) const
size_t find_first_not_of (char c, size_t pos=0) const
size_t findFirstNotOf (char c, size_t pos=0) const
size_t find_last_not_of (const MStr &str, size_t pos=npos) const
size_t findLastNotOf (const MStr &str, size_t pos=npos) const
size_t find_last_not_of (const char *s, size_t pos, size_t n) const
size_t findLastNotOf (const char *s, size_t pos, size_t n) const
size_t find_last_not_of (const char *s, size_t pos=npos) const
size_t findLastNotOf (const char *s, size_t pos=npos) const
size_t find_last_not_of (char c, size_t pos=npos) const
size_t findLastNotOf (char c, size_t pos=npos) const

Static Public Member Functions

static MStr toStr (const MVar &v, bool concise=true, bool quote=true)
static bool isLower (int c)
static bool isUpper (int c)
static bool isDigit (int c)
static bool isAlpha (int c)
static int toLower (int c)
static int toUpper (int c)
template<typename T >
static MStr join (const T &v, const MStr &delimiter, bool concise=true, bool quote=false)

Static Public Attributes

static const size_t npos = std::string::npos

Detailed Description

Extends the standard string type, adding some useful convenience methods.

MStr provides a string data type which is fully compatible with the standard string.


Member Function Documentation

size_t Meta::MStr::findCount ( const MStr str) const
Returns:
a count of the number of times str occurs within this string.

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