Rosetta 3.3
|
Cstring: C String Wrapper. More...
#include <Cstring.hh>
Public Types | |
typedef std::size_t | size_type |
typedef std::size_t | Size |
Public Member Functions | |
Cstring () | |
Default Constructor. | |
Cstring (Cstring const &s) | |
Copy Constructor. | |
Cstring (c_cstring const s) | |
C string Constructor: Implicit Conversion. | |
Cstring (std::string const &s) | |
std::string Constructor | |
Cstring (Cstring const &s, size_type const len) | |
Cstring + Length Constructor. | |
Cstring (c_cstring const s, size_type const len) | |
C string + Length Constructor. | |
Cstring (std::string const &s, size_type const len) | |
std::string + Length Constructor | |
Cstring (char const c) | |
char Constructor | |
Cstring (size_type const len) | |
Length Constructor. | |
Cstring (int const len) | |
Length Constructor. | |
virtual | ~Cstring () |
Destructor. | |
operator c_cstring () const | |
C string Conversion: Invalid after str_ is reallocated. | |
operator cstring () | |
C string Conversion: Invalid after str_ is reallocated. | |
Cstring & | operator= (Cstring const &s) |
Copy Assignment. | |
Cstring & | operator= (c_cstring const s) |
cstring Assignment | |
Cstring & | operator= (std::string const &s) |
std::string Assignment | |
Cstring & | operator= (char const c) |
char Assignment | |
Cstring & | operator+= (Cstring const &s) |
Cstring Append. | |
Cstring & | operator+= (c_cstring const s) |
cstring Append | |
Cstring & | operator+= (std::string const &s) |
std::string Append | |
Cstring & | operator+= (char const c) |
char Append | |
bool | empty () const |
Empty? | |
bool | is_blank () const |
Blank? | |
bool | not_blank () const |
Not blank? | |
bool | has_any_of (Cstring const &s) const |
Has Any Character of a Cstring? | |
bool | has_any_of (c_cstring const s) const |
Has Any Character of a cstring? | |
bool | has_any_of (std::string const s) const |
Has Any Character of a std::string? | |
bool | has_any_of (char const c) const |
Has a Character? | |
bool | has (char const c) const |
Has a Character? | |
size_type | length () const |
Length. | |
size_type | len () const |
Length. | |
size_type | size () const |
Size. | |
size_type | len_trim () const |
Length Space-Trimmed. | |
size_type | len_trim_whitespace () const |
Length Whitespace-Trimmed. | |
size_type | find (char const c) const |
Find First Occurrence of a Character. | |
size_type | find_last (char const c) const |
Find Last Occurrence of a Character. | |
Cstring & | lowercase () |
Lowercase. | |
Cstring & | uppercase () |
Uppercase. | |
Cstring & | left_justify () |
Left Justify. | |
Cstring & | right_justify () |
Right Justify. | |
Cstring & | trim () |
Trim Trailing Space. | |
Cstring & | trim_whitespace () |
Trim Trailing Whitespace. | |
Cstring & | center () |
Center. | |
Cstring & | compress () |
Compress Out Whitespace. | |
void | swap (Cstring &s) |
swap( Cstring ) | |
char | operator[] (size_type const i) const |
Cstring[ i ] const. | |
char & | operator[] (size_type const i) |
Cstring[ i ]. | |
char | operator[] (int const i) const |
Cstring[ i ] const. | |
char & | operator[] (int const i) |
Cstring[ i ]. | |
Cstring | lowercased () const |
Lowercased Copy. | |
Cstring | uppercased () const |
Uppercased Copy. | |
Cstring | left_justified () const |
Left-Justified Copy. | |
Cstring | right_justified () const |
Right-Justified Copy. | |
Cstring | trimmed () const |
Space-Trimmed Copy. | |
Cstring | trimmed_whitespace () const |
Whitespace-Trimmed Copy. | |
Cstring | centered () const |
Centered Copy. | |
Cstring | compressed () const |
Compressed Copy. | |
Static Public Attributes | |
static size_type const | npos = static_cast< size_type >( -1 ) |
Friends | |
void | swap (Cstring &s, Cstring &t) |
swap( Cstring, Cstring ) | |
Cstring | operator+ (Cstring const &s, Cstring const &t) |
Cstring + Cstring. | |
Cstring | operator+ (Cstring const &s, c_cstring const t) |
Cstring + cstring. | |
Cstring | operator+ (c_cstring const s, Cstring const &t) |
cstring + Cstring | |
Cstring | operator+ (Cstring const &s, std::string const &t) |
Cstring + std::string. | |
Cstring | operator+ (Cstring const &s, char const c) |
Cstring + char. | |
Cstring | operator+ (char const c, Cstring const &t) |
char + Cstring | |
bool | operator== (Cstring const &s, Cstring const &t) |
Cstring == Cstring. | |
bool | operator!= (Cstring const &s, Cstring const &t) |
Cstring != Cstring. | |
bool | operator== (Cstring const &s, c_cstring const t) |
Cstring == cstring. | |
bool | operator== (c_cstring const t, Cstring const &s) |
cstring == Cstring | |
bool | operator!= (Cstring const &s, c_cstring const t) |
Cstring != cstring. | |
bool | operator!= (c_cstring const t, Cstring const &s) |
cstring != Cstring | |
bool | operator== (Cstring const &s, std::string const &t) |
Cstring == std::string. | |
bool | operator== (std::string const &t, Cstring const &s) |
std::string == Cstring | |
bool | operator!= (Cstring const &s, std::string const &t) |
Cstring != std::string. | |
bool | operator!= (std::string const &t, Cstring const &s) |
std::string != Cstring | |
bool | operator== (Cstring const &s, char const c) |
Cstring == char. | |
bool | operator== (char const c, Cstring const &s) |
char == Cstring | |
bool | operator!= (Cstring const &s, char const c) |
Cstring != char. | |
bool | operator!= (char const c, Cstring const &s) |
char != Cstring | |
bool | equali (Cstring const &s, Cstring const &t) |
Cstring == Cstring Case-Insensitively? | |
bool | equali (Cstring const &s, c_cstring const t) |
Cstring == cstring Case-Insensitively? | |
bool | equali (c_cstring const s, Cstring const &t) |
cstring == Cstring Case-Insensitively? | |
bool | equali (Cstring const &s, std::string const &t) |
Cstring == std::string Case-Insensitively? | |
bool | equali (std::string const &s, Cstring const &t) |
std::string == Cstring Case-Insensitively? | |
bool | equali (Cstring const &s, char const c) |
Cstring == char Case-Insensitively? | |
bool | equali (char const c, Cstring const &s) |
char == Cstring Case-Insensitively? | |
std::ostream & | operator<< (std::ostream &stream, Cstring const &s) |
Output to Stream. | |
std::istream & | operator>> (std::istream &stream, Cstring &s) |
Input from Stream. |
Cstring: C String Wrapper.
typedef std::size_t ObjexxFCL::Cstring::Size |
typedef std::size_t ObjexxFCL::Cstring::size_type |
ObjexxFCL::Cstring::Cstring | ( | ) | [inline] |
Default Constructor.
Referenced by centered(), compressed(), left_justified(), lowercased(), operator+=(), right_justified(), trimmed(), trimmed_whitespace(), and uppercased().
ObjexxFCL::Cstring::Cstring | ( | Cstring const & | s | ) | [inline] |
Copy Constructor.
ObjexxFCL::Cstring::Cstring | ( | c_cstring const | s | ) | [inline] |
C string Constructor: Implicit Conversion.
ObjexxFCL::Cstring::Cstring | ( | std::string const & | s | ) | [inline, explicit] |
std::string Constructor
References len().
C string + Length Constructor.
References len().
ObjexxFCL::Cstring::Cstring | ( | std::string const & | s, |
size_type const | len | ||
) | [inline] |
std::string + Length Constructor
References len().
ObjexxFCL::Cstring::Cstring | ( | char const | c | ) | [inline, explicit] |
char Constructor
ObjexxFCL::Cstring::Cstring | ( | size_type const | len | ) | [inline, explicit] |
Length Constructor.
References len().
ObjexxFCL::Cstring::Cstring | ( | int const | len | ) | [inline, explicit] |
Length Constructor.
References len().
virtual ObjexxFCL::Cstring::~Cstring | ( | ) | [inline, virtual] |
Destructor.
Cstring & ObjexxFCL::Cstring::center | ( | ) |
Center.
References left_justify(), len_trim(), length(), ObjexxFCL::pad(), and ObjexxFCL::SPACE().
Cstring & ObjexxFCL::Cstring::compress | ( | ) |
Compress Out Whitespace.
References color_pdb::i, len(), ObjexxFCL::NULLC(), ObjexxFCL::SPACE(), and ObjexxFCL::TAB().
bool ObjexxFCL::Cstring::empty | ( | ) | const [inline] |
Empty?
Cstring::size_type ObjexxFCL::Cstring::find | ( | char const | c | ) | const |
Find First Occurrence of a Character.
References color_pdb::i, and npos.
Cstring::size_type ObjexxFCL::Cstring::find_last | ( | char const | c | ) | const |
Find Last Occurrence of a Character.
References color_pdb::i, and npos.
bool ObjexxFCL::Cstring::has | ( | char const | c | ) | const |
Has a Character?
References color_pdb::i.
bool ObjexxFCL::Cstring::has_any_of | ( | std::string const | s | ) | const |
Has Any Character of a std::string?
References color_pdb::i.
bool ObjexxFCL::Cstring::has_any_of | ( | char const | c | ) | const |
Has a Character?
References color_pdb::i.
Has Any Character of a Cstring?
References color_pdb::i, and length().
Has Any Character of a cstring?
References color_pdb::i.
bool ObjexxFCL::Cstring::is_blank | ( | ) | const [inline] |
Blank?
References len_trim().
Cstring ObjexxFCL::Cstring::left_justified | ( | ) | const [inline] |
Left-Justified Copy.
References Cstring().
Cstring & ObjexxFCL::Cstring::left_justify | ( | ) |
size_type ObjexxFCL::Cstring::len | ( | ) | const [inline] |
Length.
Referenced by compress(), Cstring(), left_justify(), operator=(), and right_justify().
Cstring::size_type ObjexxFCL::Cstring::len_trim | ( | ) | const |
Length Space-Trimmed.
References color_pdb::i, and ObjexxFCL::SPACE().
Referenced by center(), is_blank(), not_blank(), trim(), and trimmed().
Cstring::size_type ObjexxFCL::Cstring::len_trim_whitespace | ( | ) | const |
Length Whitespace-Trimmed.
References color_pdb::i, ObjexxFCL::NULLC(), ObjexxFCL::SPACE(), and ObjexxFCL::TAB().
Referenced by trim_whitespace(), and trimmed_whitespace().
size_type ObjexxFCL::Cstring::length | ( | ) | const [inline] |
Length.
Referenced by center(), Cstring(), ObjexxFCL::equali(), has_any_of(), ObjexxFCL::operator!=(), ObjexxFCL::operator+(), operator=(), and ObjexxFCL::operator==().
Cstring & ObjexxFCL::Cstring::lowercase | ( | ) |
Lowercase.
References color_pdb::i.
bool ObjexxFCL::Cstring::not_blank | ( | ) | const [inline] |
Not blank?
References len_trim().
ObjexxFCL::Cstring::operator c_cstring | ( | ) | const [inline] |
C string Conversion: Invalid after str_ is reallocated.
ObjexxFCL::Cstring::operator cstring | ( | ) | [inline] |
C string Conversion: Invalid after str_ is reallocated.
cstring Append
References Cstring().
Cstring& ObjexxFCL::Cstring::operator+= | ( | std::string const & | s | ) | [inline] |
std::string Append
References Cstring().
cstring Assignment
References len().
Cstring& ObjexxFCL::Cstring::operator= | ( | char const | c | ) | [inline] |
char Assignment
Cstring& ObjexxFCL::Cstring::operator= | ( | std::string const & | s | ) | [inline] |
std::string Assignment
References len().
char ObjexxFCL::Cstring::operator[] | ( | int const | i | ) | const [inline] |
Cstring[ i ] const.
References color_pdb::i.
char& ObjexxFCL::Cstring::operator[] | ( | int const | i | ) | [inline] |
Cstring[ i ].
References color_pdb::i.
char& ObjexxFCL::Cstring::operator[] | ( | size_type const | i | ) | [inline] |
Cstring[ i ].
References color_pdb::i.
char ObjexxFCL::Cstring::operator[] | ( | size_type const | i | ) | const [inline] |
Cstring[ i ] const.
References color_pdb::i.
Cstring ObjexxFCL::Cstring::right_justified | ( | ) | const [inline] |
Right-Justified Copy.
References Cstring().
Cstring & ObjexxFCL::Cstring::right_justify | ( | ) |
Right Justify.
References color_pdb::i, len(), and ObjexxFCL::SPACE().
size_type ObjexxFCL::Cstring::size | ( | ) | const [inline] |
Size.
void ObjexxFCL::Cstring::swap | ( | Cstring & | s | ) | [inline] |
swap( Cstring )
Referenced by ObjexxFCL::swap().
Cstring& ObjexxFCL::Cstring::trim | ( | ) | [inline] |
Trim Trailing Space.
References len_trim().
Cstring& ObjexxFCL::Cstring::trim_whitespace | ( | ) | [inline] |
Trim Trailing Whitespace.
References len_trim_whitespace().
Cstring ObjexxFCL::Cstring::trimmed | ( | ) | const [inline] |
Space-Trimmed Copy.
References Cstring(), and len_trim().
Cstring ObjexxFCL::Cstring::trimmed_whitespace | ( | ) | const [inline] |
Whitespace-Trimmed Copy.
References Cstring(), and len_trim_whitespace().
Cstring & ObjexxFCL::Cstring::uppercase | ( | ) |
Uppercase.
References color_pdb::i.
Cstring == cstring Case-Insensitively?
cstring == Cstring Case-Insensitively?
Cstring == std::string Case-Insensitively?
std::string == Cstring Case-Insensitively?
std::ostream& operator<< | ( | std::ostream & | stream, |
Cstring const & | s | ||
) | [friend] |
Output to Stream.
std::istream& operator>> | ( | std::istream & | stream, |
Cstring & | s | ||
) | [friend] |
Input from Stream.
Cstring::size_type const ObjexxFCL::Cstring::npos = static_cast< size_type >( -1 ) [static] |
Referenced by find(), and find_last().