SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Offers powerful and convenient facilities for manipulating wide character strings. More...
#include <rw/wstring.h>
Public Types | |
enum | stripType { leading, trailing, both } |
enum | caseCompare { exact, ignoreCase, ignoreCaseStrict } |
enum | ascii_ { ascii } |
enum | multiByte_ { multiByte } |
typedef RWWSubString | SubString |
typedef RWWConstSubString | ConstSubString |
Public Member Functions | |
RWWString () | |
RWWString (const std::wstring &str) | |
RWWString (const RWWString &str) | |
RWWString (RWWString &&str) | |
RWWString (RWSize_T cap) | |
RWWString (wchar_t c) | |
RWWString (wchar_t c, size_t count) | |
RWWString (const wchar_t *str) | |
RWWString (const wchar_t *str, size_t len) | |
RWWString (char c) | |
RWWString (char c, size_t count) | |
RWWString (signed char c) | |
RWWString (unsigned char c) | |
RWWString (const char *str, ascii_) | |
RWWString (const RWCString &str, ascii_) | |
RWWString (const char *str, multiByte_) | |
RWWString (const RWCString &str, multiByte_) | |
RWWString (const char *str, size_t len, ascii_) | |
RWWString (const char *str, size_t len, multiByte_) | |
RWWString (const SubString &str) | |
RWWString (const ConstSubString &str) | |
operator const wchar_t * () const | |
RWWString & | operator= (wchar_t c) |
RWWString & | operator= (const wchar_t *str) |
RWWString & | operator= (const std::wstring &str) |
RWWString & | operator= (const RWWString &str) |
RWWString & | operator= (RWWString &&str) |
RWWString & | operator+= (wchar_t c) |
RWWString & | operator+= (const wchar_t *str) |
RWWString & | operator+= (const std::wstring &str) |
RWWString & | operator+= (const RWWString &str) |
wchar_t & | operator() (size_t i) |
wchar_t | operator() (size_t i) const |
wchar_t & | operator[] (short i) |
wchar_t & | operator[] (int i) |
wchar_t & | operator[] (long i) |
wchar_t & | operator[] (unsigned short i) |
wchar_t & | operator[] (unsigned int i) |
wchar_t & | operator[] (unsigned long i) |
wchar_t | operator[] (short i) const |
wchar_t | operator[] (int i) const |
wchar_t | operator[] (long i) const |
wchar_t | operator[] (unsigned short i) const |
wchar_t | operator[] (unsigned int i) const |
wchar_t | operator[] (unsigned long i) const |
wchar_t & | operator[] (long long i) |
wchar_t & | operator[] (unsigned long long i) |
wchar_t | operator[] (long long i) const |
wchar_t | operator[] (unsigned long long i) const |
SubString | operator() (size_t start, size_t len) |
ConstSubString | operator() (size_t start, size_t len) const |
SubString | subString (const wchar_t *pat, size_t start=0, caseCompare cmp=exact) |
ConstSubString | subString (const wchar_t *pat, size_t start=0, caseCompare cmp=exact) const |
SubString | strip (stripType st=trailing, wchar_t c=L' ') |
ConstSubString | strip (stripType st=trailing, wchar_t c=L' ') const |
RWWString & | append (wchar_t c, size_t count=1) |
RWWString & | append (const wchar_t *str) |
RWWString & | append (const wchar_t *str, size_t len) |
RWWString & | append (const std::wstring &str) |
RWWString & | append (const RWWString &str) |
RWWString & | append (const std::wstring &str, size_t len) |
RWWString & | append (const RWWString &str, size_t len) |
RWspace | binaryStoreSize () const |
size_t | capacity () const |
size_t | capacity (size_t cap) |
int | collate (const wchar_t *str) const |
int | collate (const std::wstring &str) const |
int | collate (const RWWString &str) const |
int | compareTo (const wchar_t *str, caseCompare cmp=exact) const |
int | compareTo (const std::wstring &str, caseCompare cmp=exact) const |
int | compareTo (const std::wstring *str, caseCompare cmp=exact) const |
int | compareTo (const RWWString &str, caseCompare cmp=exact) const |
int | compareTo (const RWWString *str, caseCompare cmp=exact) const |
bool | contains (const wchar_t *str, caseCompare cmp=exact) const |
bool | contains (const std::wstring &str, caseCompare cmp=exact) const |
bool | contains (const RWWString &str, caseCompare cmp=exact) const |
const wchar_t * | data () const |
std::wstring & | std () |
const std::wstring & | std () const |
void | swap (RWWString &str) |
size_t | first (wchar_t c) const |
size_t | first (wchar_t c, size_t) const |
size_t | first (const wchar_t *str) const |
size_t | first (const wchar_t *str, size_t len) const |
unsigned long | hash (caseCompare cmp=exact) const |
size_t | index (const wchar_t *pat, size_t start=0, caseCompare cmp=exact) const |
size_t | index (const std::wstring &pat, size_t start=0, caseCompare cmp=exact) const |
size_t | index (const RWWString &pat, size_t start=0, caseCompare cmp=exact) const |
size_t | index (const wchar_t *pat, size_t patlen, size_t start, caseCompare cmp) const |
size_t | index (const std::wstring &pat, size_t patlen, size_t start, caseCompare cmp) const |
size_t | index (const RWWString &pat, size_t patlen, size_t start, caseCompare cmp) const |
RWWString & | insert (size_t pos, wchar_t c, size_t count) |
RWWString & | insert (size_t pos, const wchar_t *str) |
RWWString & | insert (size_t pos, const wchar_t *str, size_t len) |
RWWString & | insert (size_t pos, const std::wstring &str) |
RWWString & | insert (size_t pos, const RWWString &str) |
RWWString & | insert (size_t pos, const std::wstring &str, size_t len) |
RWWString & | insert (size_t pos, const RWWString &str, size_t len) |
bool | isAscii () const |
bool | isNull () const |
size_t | last (wchar_t c) const |
size_t | last (wchar_t c, size_t) const |
size_t | last (const wchar_t *str) const |
size_t | last (const wchar_t *str, size_t len) const |
size_t | length () const |
RWWString & | prepend (wchar_t c, size_t count=1) |
RWWString & | prepend (const wchar_t *str) |
RWWString & | prepend (const wchar_t *str, size_t len) |
RWWString & | prepend (const std::wstring &str) |
RWWString & | prepend (const RWWString &str) |
RWWString & | prepend (const std::wstring &str, size_t len) |
RWWString & | prepend (const RWWString &str, size_t len) |
std::istream & | readFile (std::istream &strm) |
std::istream & | readLine (std::istream &strm, bool skipWhite=true) |
std::istream & | readString (std::istream &strm) |
std::istream & | readToDelim (std::istream &strm) |
std::istream & | readToDelim (std::istream &strm, wchar_t delim) |
std::istream & | readToken (std::istream &strm) |
std::wistream & | readToken (std::wistream &strm) |
RWWString & | remove (size_t pos) |
RWWString & | remove (size_t pos, size_t len) |
RWWString & | replace (size_t pos, size_t len, const wchar_t *str) |
RWWString & | replace (size_t pos, size_t len, const std::wstring &str) |
RWWString & | replace (size_t pos, size_t len, const RWWString &str) |
RWWString & | replace (size_t pos, size_t len, const wchar_t *str, size_t strLen) |
RWWString & | replace (size_t pos, size_t len, const std::wstring &str, size_t strLen) |
RWWString & | replace (size_t pos, size_t len, const RWWString &str, size_t strLen) |
void | resize (size_t len) |
size_t | rindex (const wchar_t *pat, caseCompare cmp) const |
size_t | rindex (const wchar_t *pat, size_t end=RW_NPOS, caseCompare cmp=exact) const |
size_t | rindex (const std::wstring &pat, size_t end=RW_NPOS, caseCompare cmp=exact) const |
size_t | rindex (const RWWString &pat, size_t end=RW_NPOS, caseCompare cmp=exact) const |
size_t | rindex (const wchar_t *pat, size_t patlen, size_t end, caseCompare cmp) const |
size_t | rindex (const std::wstring &pat, size_t patlen, size_t end, caseCompare cmp) const |
size_t | rindex (const RWWString &pat, size_t patlen, size_t end, caseCompare cmp) const |
RWCString | toAscii () const |
RWCString | toMultiByte () const |
void | toLower () |
void | toUpper () |
bool | operator== (const RWWString &rhs) const |
bool | operator!= (const RWWString &rhs) const |
bool | operator< (const RWWString &rhs) const |
bool | operator> (const RWWString &rhs) const |
Static Public Member Functions | |
static RWWString | fromAscii (const RWCString &str) |
static RWWString | fromMultiByte (const RWCString &str) |
static unsigned | hash (const RWWString &wstr) |
static size_t | initialCapacity (size_t ic=15) |
static size_t | maxWaste (size_t) |
static size_t | resizeIncrement (size_t ri=16) |
Friends | |
RWWString | operator+ (const RWWString &lhs, const RWWString &rhs) |
RWWString | operator+ (const RWWString &lhs, const wchar_t *rhs) |
RWWString | operator+ (const wchar_t *lhs, const RWWString &rhs) |
RWWString | operator+ (const std::wstring &lhs, const RWWString &rhs) |
RWWString | operator+ (const RWWString &lhs, const std::wstring &rhs) |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator<= (const RWWString &rhs) const |
bool | operator>= (const RWWString &rhs) const |
RWWString | strXForm (const std::wstring &str) |
RWWString | strXForm (const RWWString &str) |
RWWString | toLower (const RWWString &str) |
RWWString | toUpper (const RWWString &str) |
std::ostream & | operator<< (std::ostream &os, const RWWString &s) |
std::istream & | operator>> (std::istream &s, RWWString &str) |
RWvistream & | operator>> (RWvistream &str, RWWString &cstr) |
RWFile & | operator>> (RWFile &file, RWWString &cstr) |
RWvostream & | operator<< (RWvostream &vos, const RWWString &str) |
RWFile & | operator<< (RWFile &file, const RWWString &str) |
bool | operator== (const RWWString &lhs, const wchar_t *rhs) |
bool | operator== (const wchar_t *lhs, const RWWString &rhs) |
bool | operator== (const RWWString &lhs, const std::wstring &rhs) |
bool | operator== (const std::wstring &lhs, const RWWString &rhs) |
bool | operator!= (const RWWString &lhs, const wchar_t *rhs) |
bool | operator!= (const wchar_t *lhs, const RWWString &rhs) |
bool | operator!= (const RWWString &lhs, const std::wstring &rhs) |
bool | operator!= (const std::wstring &lhs, const RWWString &rhs) |
bool | operator< (const RWWString &lhs, const wchar_t *rhs) |
bool | operator< (const wchar_t *lhs, const RWWString &rhs) |
bool | operator< (const RWWString &lhs, const std::wstring &rhs) |
bool | operator< (const std::wstring &lhs, const RWWString &rhs) |
bool | operator> (const RWWString &lhs, const wchar_t *rhs) |
bool | operator> (const wchar_t *lhs, const RWWString &rhs) |
bool | operator> (const RWWString &lhs, const std::wstring &rhs) |
bool | operator> (const std::wstring &lhs, const RWWString &rhs) |
bool | operator<= (const RWWString &lhs, const wchar_t *rhs) |
bool | operator<= (const wchar_t *lhs, const RWWString &rhs) |
bool | operator<= (const RWWString &lhs, const std::wstring &rhs) |
bool | operator<= (const std::wstring &lhs, const RWWString &rhs) |
bool | operator>= (const RWWString &lhs, const wchar_t *rhs) |
bool | operator>= (const wchar_t *lhs, const RWWString &rhs) |
bool | operator>= (const RWWString &lhs, const std::wstring &rhs) |
bool | operator>= (const std::wstring &lhs, const RWWString &rhs) |
bool | operator== (const RWWSubString &lhs, const RWWString &rhs) |
bool | operator== (const RWWString &lhs, const RWWSubString &rhs) |
bool | operator!= (const RWWSubString &lhs, const RWWString &rhs) |
bool | operator!= (const RWWString &lhs, const RWWSubString &rhs) |
bool | operator== (const RWWConstSubString &lhs, const RWWString &rhs) |
bool | operator== (const RWWString &lhs, const RWWConstSubString &rhs) |
bool | operator!= (const RWWConstSubString &lhs, const RWWString &rhs) |
bool | operator!= (const RWWString &lhs, const RWWConstSubString &rhs) |
Class RWWString offers very powerful and convenient facilities for manipulating wide character strings.
This string class manipulates wide characters of the fundamental type wchar_t
. These characters are generally two or four bytes, and can be used to encode richer code sets than the classic char
type. Because wchar_t
characters are all the same size, indexing is fast.
Conversion to and from multibyte and US-ASCII forms are provided by the RWWString constructors, and by the RWWString member functions isAscii(), toAscii(), and toMultiByte().
Stream operations implicitly translate to and from the multibyte stream representation. That is, on output, wide character strings are converted into multibyte strings, while on input they are converted back into wide character strings. Hence, the external representation of wide character strings is usually as multibyte character strings, saving storage space, and making interfaces with devices (which usually expect multibyte strings) easier.
RWWString tolerates embedded nulls.
Parameters of type const wchar_t*
must not be passed a value of zero. This is detected in the debug version of the library.
A separate RWWSubString class supports substring extraction and modification operations. RWWConstSubString supports substring extractions on const
RWWString instances.
#include <rw/wstring.h> RWWString a;
Simple
#include <iostream> #include <rw/wstring.h> int main () { RWWString a(L"There is no joy in Beantown"); std::cout << a << std::endl << "becomes......" << std::endl; a.subString(L"Beantown") = L"Redmond"; std::cout << a << std::endl; return 0; }
Program output (assuming your platform displays wide characters as US-ASCII if they are in the US-ASCII character set):
"There is no joy in Beantown" becomes "There is no joy in Redmond."
The immutable substring class associated with RWWString.
typedef RWWSubString RWWString::SubString |
The mutable substring class associated with RWWString.
enum RWWString::ascii_ |
Specifies semantics used by comparisons, searches, and hashing functions
exact |
Use exact case sensitive semantics. |
ignoreCase |
Ignore case sensitive semantics. |
ignoreCaseStrict |
Case-insensitive for alpha characters only. ignoreCaseStrict only differs from ignoreCase in comparison operations, where changing case can affect the order of the strings. |
enum RWWString::stripType |
Specifies how to strip characters from a string. Used by strip().
RWWString::RWWString | ( | ) | [inline] |
Creates a string of length zero (the null string).
RWWString::RWWString | ( | const std::wstring & | str | ) | [inline] |
Constructs a string with data copied from str.
RWWString::RWWString | ( | const RWWString & | str | ) | [inline] |
Copy constructor. The created string copies the data from str.
RWWString::RWWString | ( | RWWString && | str | ) | [inline] |
Move constructor. The created string takes ownership of the data owned by str.
RWWString::RWWString | ( | RWSize_T | cap | ) | [inline] |
Creates a string of length zero (the null string). The string's capacity (that is, the size it can grow to without resizing) is given by the parameter cap. We recommend creating an RWSize_T value from a numerical constant to pass into this constructor. While RWSize_T knows how to convert size_t
values to itself, conforming compilers choose the conversion to char
instead.
RWWString::RWWString | ( | wchar_t | c | ) | [inline] |
Constructs a string containing the single character c.
RWWString::RWWString | ( | wchar_t | c, | |
size_t | count | |||
) | [inline] |
Constructs a string containing the character c repeated count times.
RWWString::RWWString | ( | const wchar_t * | str | ) | [inline] |
Converts from the null-terminated wide character string str. The created string copies the data pointed to by str, up to the first terminating null.
RWWString::RWWString | ( | const wchar_t * | str, | |
size_t | len | |||
) | [inline] |
Constructs a string from the character string str. The created string copies the data pointed to by str. Exactly len characters are copied, including any embedded nulls. Hence, the buffer pointed to by str must be at least len * sizeof(wchar_t)
bytes or len wide characters long.
RWWString::RWWString | ( | char | c | ) | [inline] |
Constructs a string containing the single character c. The character c is widened to a wchar_t
.
RWWString::RWWString | ( | char | c, | |
size_t | count | |||
) | [inline] |
Constructs a string containing the character c repeated count times. The character c is widened to a wchar_t
.
RWWString::RWWString | ( | signed char | c | ) | [inline] |
Constructs a string containing the single signed character c. The character c is widened to a wchar_t
.
RWWString::RWWString | ( | unsigned char | c | ) | [inline] |
Constructs a string containing the single unsigned character c. The character c is widened to a wchar_t
.
RWWString::RWWString | ( | const char * | str, | |
ascii_ | ||||
) | [inline] |
Constructs a wide character string from the US-ASCII character string contained in str.
For this conversion to be successful, the string must contain only US-ASCII characters. This can be confirmed (if necessary) using RWCString::isAscii(). If str contains non-US-ASCII characters, the RWWString(const char*,multiByte_) constructor should be used instead.
This constructor can be used as follows:
RWWString a("An US-ASCII character string", RWWString::ascii);
Constructs a wide character string from the US-ASCII character string contained in str.For this conversion to be successful, the string must contain only US-ASCII characters. This can be confirmed (if necessary) using RWCString::isAscii(). If str contains non-US-ASCII characters, the RWWString(const char*,multiByte_) constructor should be used instead.This constructor can be used as follows:
RWWString a("An US-ASCII character string", RWWString::ascii);
RWWString::RWWString | ( | const char * | str, | |
multiByte_ | ||||
) | [inline] |
RWWString::RWWString | ( | const RWCString & | str, | |
multiByte_ | ||||
) |
RWWString::RWWString | ( | const char * | str, | |
size_t | len, | |||
ascii_ | ||||
) | [inline] |
Constructs a wide character string from the US-ASCII character string contained in str, copying exactly len characters including any embedded nulls. Hence, the buffer pointed to by str must be long enough to hold len characters.
RWWString::RWWString | ( | const char * | str, | |
size_t | len, | |||
multiByte_ | ||||
) | [inline] |
Constructs a wide character string from the multibyte character string contained in str, copying exactly len characters including any embedded nulls. Hence, the buffer pointed to by str must be long enough to hold len characters.
RWWString::RWWString | ( | const SubString & | str | ) | [inline] |
Converts from substring. The created string copies the substring represented by str.
RWWString::RWWString | ( | const ConstSubString & | str | ) | [inline] |
Converts from substring. The created wide string copies the substring represented by str.
Appends the first len characters of str to self. If len is greater than the length of str, the entire string is appended. Returns a reference to self.
RWWString & RWWString::append | ( | const std::wstring & | str, | |
size_t | len | |||
) | [inline] |
Appends the first len characters of str to self. If len is greater than the length of str, the entire string is appended. Returns a reference to self.
Appends a copy of the string str to self. Returns a reference to self.
RWWString & RWWString::append | ( | const std::wstring & | str | ) | [inline] |
Appends a copy of the string str to self. Returns a reference to self.
RWWString & RWWString::append | ( | const wchar_t * | str, | |
size_t | len | |||
) | [inline] |
Appends a copy of the wide character string str to self. Exactly len characters are copied, including any embedded nulls. Hence, the buffer pointed to by str must be at least len characters long. Returns a reference to self.
RWWString & RWWString::append | ( | const wchar_t * | str | ) | [inline] |
Appends a copy of the null-terminated wide character string pointed to by str to self. Returns a reference to self.
RWWString & RWWString::append | ( | wchar_t | c, | |
size_t | count = 1 | |||
) | [inline] |
Appends count copies of the character c to self. Returns a reference to self.
RWspace RWWString::binaryStoreSize | ( | ) | const [inline] |
Returns the number of bytes necessary to store the object using the global function:
RWFile& operator<<(RWFile&, const RWWString&); RWvostream& operator<<(RWvostream&, const RWWString&);
Reimplemented in RWCollectableWString.
size_t RWWString::capacity | ( | size_t | cap | ) | [inline] |
A non-binding request to alter the capacity of self to cap
. The capacity is never reduced below the current number of characters. Returns the actual capacity.
size_t RWWString::capacity | ( | ) | const [inline] |
Returns the current capacity of self. This is the number of characters the string can hold without resizing.
int RWWString::collate | ( | const RWWString & | str | ) | const [inline] |
Returns an int
less than, greater than, or equal to zero, according to the result of calling the POSIX function wscoll()
on self and the argument str. This method supports locale-dependent collation.
int RWWString::collate | ( | const std::wstring & | str | ) | const [inline] |
Returns an int
less than, greater than, or equal to zero, according to the result of calling the POSIX function wscoll()
on self and the argument str. This method supports locale-dependent collation.
int RWWString::collate | ( | const wchar_t * | str | ) | const [inline] |
Returns an int
less than, greater than, or equal to zero, according to the result of calling the POSIX function wscoll()
on self and the argument str. This method supports locale-dependent collation.
int RWWString::compareTo | ( | const RWWString * | str, | |
caseCompare | cmp = exact | |||
) | const [inline] |
This function is the equivalent of calling:
RWWString::compareTo(*str, cmp);
int RWWString::compareTo | ( | const RWWString & | str, | |
caseCompare | cmp = exact | |||
) | const [inline] |
Lexicographically compares self to str. Returns the following values based on the results of the comparison:
<0 | self precedes str. |
0 | self is equal to str. |
>0 | self follows str. |
If cmp is either RWCString::ignoreCase or RWCString::ignoreCaseStrict, the strings are normalized before they are compared.
Reimplemented in RWCollectableWString.
int RWWString::compareTo | ( | const std::wstring * | str, | |
caseCompare | cmp = exact | |||
) | const [inline] |
This function is the equivalent of calling:
RWWString::compareTo(*str, cmp);
int RWWString::compareTo | ( | const std::wstring & | str, | |
caseCompare | cmp = exact | |||
) | const [inline] |
Lexicographically compares self to str. Returns the following values based on the results of the comparison:
<0 | self precedes str. |
0 | self is equal to str. |
>0 | self follows str. |
int RWWString::compareTo | ( | const wchar_t * | str, | |
caseCompare | cmp = exact | |||
) | const [inline] |
Lexicographically compares self to str. Returns the following values based on the results of the comparison:
<0 | self precedes str. |
0 | self is equal to str. |
>0 | self follows str. |
Reimplemented in RWCollectableWString.
bool RWWString::contains | ( | const RWWString & | str, | |
caseCompare | cmp = exact | |||
) | const [inline] |
Returns false
if RWWString::index(str, cmp) returns RW_NPOS, otherwise returns true
.
bool RWWString::contains | ( | const std::wstring & | str, | |
caseCompare | cmp = exact | |||
) | const [inline] |
Returns false
if RWWString::index(str, cmp) returns RW_NPOS, otherwise returns true
.
bool RWWString::contains | ( | const wchar_t * | str, | |
caseCompare | cmp = exact | |||
) | const [inline] |
Returns false
if RWWString::index(str, cmp) returns RW_NPOS, otherwise returns true
.
const wchar_t* RWWString::data | ( | void | ) | const [inline] |
Provides access to the RWWString instances's data as a null-terminated string. This datum is owned by the RWWString and may not be deleted or changed. If the RWWString object itself changes or goes out of scope, the pointer value previously returned becomes invalid. While the string is null-terminated, note that its length is still given by the member function length(). That is, it may contain embedded nulls.
size_t RWWString::first | ( | const wchar_t * | str, | |
size_t | len | |||
) | const [inline] |
Returns the index of the first occurrence in self of any character in str. Exactly len characters in str are checked including any embedded nulls so str must point to a buffer containing at least len characters. Returns RW_NPOS if there is no match.
size_t RWWString::first | ( | const wchar_t * | str | ) | const [inline] |
Returns the index of the first occurrence in self of any character in str. Returns RW_NPOS if there is no match.
size_t RWWString::first | ( | wchar_t | c, | |
size_t | ||||
) | const [inline] |
size_t RWWString::first | ( | wchar_t | c | ) | const [inline] |
Returns the index of the first occurrence of the character c in self. Returns RW_NPOS if there is no match.
Returns the result of the constructor RWWString::RWWString(const RWCString&, RWWString::ascii).
Returns the result of the constructor RWWString::RWWString(const RWCString&, RWWString::multiByte).
static unsigned RWWString::hash | ( | const RWWString & | wstr | ) | [inline, static] |
Returns the hash value of str as returned by hash(caseCompare) const, where caseCompare is RWWString::exact.
Reimplemented in RWCollectableWString.
unsigned long RWWString::hash | ( | caseCompare | cmp = exact |
) | const |
Returns a suitable hash value.
Reimplemented in RWCollectableWString.
size_t RWWString::index | ( | const RWWString & | pat, | |
size_t | patlen, | |||
size_t | start, | |||
caseCompare | cmp | |||
) | const [inline] |
Pattern matching. Starting with index start, searches for the first occurrence of the first patlen characters from pat in self and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
size_t RWWString::index | ( | const std::wstring & | pat, | |
size_t | patlen, | |||
size_t | start, | |||
caseCompare | cmp | |||
) | const [inline] |
Pattern matching. Starting with index start, searches for the first occurrence of the first patlen characters from pat in self and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
size_t RWWString::index | ( | const wchar_t * | pat, | |
size_t | patlen, | |||
size_t | start, | |||
caseCompare | cmp | |||
) | const [inline] |
Pattern matching. Starting with index start, searches for the first occurrence of the first patlen characters from pat in self and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
size_t RWWString::index | ( | const RWWString & | pat, | |
size_t | start = 0 , |
|||
caseCompare | cmp = exact | |||
) | const [inline] |
Pattern matching. Starting with index start, searches for the first occurrence of pat in self and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
size_t RWWString::index | ( | const std::wstring & | pat, | |
size_t | start = 0 , |
|||
caseCompare | cmp = exact | |||
) | const [inline] |
Pattern matching. Starting with index start, searches for the first occurrence of pat in self and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
size_t RWWString::index | ( | const wchar_t * | pat, | |
size_t | start = 0 , |
|||
caseCompare | cmp = exact | |||
) | const [inline] |
Pattern matching. Starting with index start, searches for the first occurrence of the null-terminated string pat in self and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
static size_t RWWString::initialCapacity | ( | size_t | ic = 15 |
) | [inline, static] |
Inserts the first len characters of str into self at index pos. If len is greater than the length of str, the entire string is inserted. Returns a reference to self.
RWWString & RWWString::insert | ( | size_t | pos, | |
const std::wstring & | str, | |||
size_t | len | |||
) | [inline] |
Inserts the first len characters of str into self at index pos. If len is greater than the length of str, the entire string is inserted. Returns a reference to self.
Inserts a copy of the string str into self at index pos. Returns a reference to self.
RWWString & RWWString::insert | ( | size_t | pos, | |
const std::wstring & | str | |||
) | [inline] |
Inserts a copy of the string str into self at index pos. Returns a reference to self.
RWWString & RWWString::insert | ( | size_t | pos, | |
const wchar_t * | str, | |||
size_t | len | |||
) | [inline] |
Inserts a copy of the first len characters of str into self at index pos. Returns a reference to self.
RWWString & RWWString::insert | ( | size_t | pos, | |
const wchar_t * | str | |||
) | [inline] |
Inserts a copy of the null-terminated string str into self at index pos. Returns a reference to self.
RWWString & RWWString::insert | ( | size_t | pos, | |
wchar_t | c, | |||
size_t | count | |||
) | [inline] |
Inserts count instances of the character c into self at index pos. Returns a reference to self.
bool RWWString::isAscii | ( | ) | const |
Returns true
if it is safe to perform the conversion toAscii() (that is, if all characters of self are US-ASCII characters).
bool RWWString::isNull | ( | void | ) | const [inline] |
Returns true
if this string has zero length (i.e., the null string).
size_t RWWString::last | ( | const wchar_t * | str, | |
size_t | len | |||
) | const [inline] |
Returns the index of the last occurrence in self of any character in str. Exactly len characters in str are checked including any embedded nulls so str must point to a buffer containing at least len characters. Returns RW_NPOS if there is no match.
size_t RWWString::last | ( | const wchar_t * | str | ) | const [inline] |
Returns the index of the last occurrence in self of any character in str. Returns RW_NPOS if there is no match.
size_t RWWString::last | ( | wchar_t | c, | |
size_t | ||||
) | const [inline] |
size_t RWWString::last | ( | wchar_t | c | ) | const [inline] |
Returns the index of the last occurrence of the character c in self. Returns RW_NPOS if there is no match.
size_t RWWString::length | ( | ) | const [inline] |
Returns the number of characters in self.
static size_t RWWString::maxWaste | ( | size_t | ) | [inline, static] |
RWWString::operator const wchar_t * | ( | ) | const [inline] |
The equivalent of calling RWWString::data() on self.
bool RWWString::operator!= | ( | const RWWString & | rhs | ) | const [inline] |
The equivalent of calling:
!(*this == rhs)
RWWConstSubString RWWString::operator() | ( | size_t | start, | |
size_t | len | |||
) | const [inline] |
Substring operator. Returns a substring of self with length len, starting at index start.The sum of start plus len must be less than or equal to the string length.
RWBoundsErr | if the library was built using the RW_DEBUG flag, and start and len are out of range. |
RWWSubString RWWString::operator() | ( | size_t | start, | |
size_t | len | |||
) | [inline] |
Substring operator. Returns a substring of self with length len, starting at index start. The sum of start plus len must be less than or equal to the string length.
RWBoundsErr | if the library was built using the RW_DEBUG flag, and start and len are out of range. |
wchar_t RWWString::operator() | ( | size_t | i | ) | const [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. Bounds checking is performed if the pre-processor macro RWBOUNDS_CHECK
has been defined before including <rw/wstring.h>
.
RWBoundsErr | if RWBOUNDS_CHECK is defined and the index is out of range. |
wchar_t & RWWString::operator() | ( | size_t | i | ) | [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. Bounds checking is performed if the pre-processor macro RWBOUNDS_CHECK
has been defined before including <rw/wstring.h>
.
RWBoundsErr | if RWBOUNDS_CHECK is defined and the index is out of range. |
Appends the string str to self. Returns a reference to self.
RWWString& RWWString::operator+= | ( | const std::wstring & | str | ) | [inline] |
Appends the string str to self. Returns a reference to self.
RWWString& RWWString::operator+= | ( | const wchar_t * | str | ) | [inline] |
Appends the null-terminated character string pointed to by str to self. Returns a reference to self.
RWWString& RWWString::operator+= | ( | wchar_t | c | ) | [inline] |
Appends the character c to self. Returns a reference to self.
bool RWWString::operator< | ( | const RWWString & | rhs | ) | const [inline] |
Returns true
if this
lexicographically precedes rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
Move assignment. Self takes ownership of the data owned by str.
Assignment operator. The string copies the data from str. Returns a reference to self.
RWWString & RWWString::operator= | ( | const std::wstring & | str | ) | [inline] |
Assignment operator. The string copies the data from str. Returns a reference to self.
RWWString & RWWString::operator= | ( | const wchar_t * | str | ) | [inline] |
Assignment operator. Copies the null-terminated character string pointed to by str into self. Returns a reference to self.
RWWString & RWWString::operator= | ( | wchar_t | c | ) | [inline] |
Assignment operator. Copies the character c into self. Returns a reference to self.
bool RWWString::operator== | ( | const RWWString & | rhs | ) | const [inline] |
Returns true
if this
is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool RWWString::operator> | ( | const RWWString & | rhs | ) | const [inline] |
The equivalent of calling:
!(rhs < *this)
wchar_t RWWString::operator[] | ( | unsigned long long | i | ) | const [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t RWWString::operator[] | ( | long long | i | ) | const [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t & RWWString::operator[] | ( | unsigned long long | i | ) | [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t & RWWString::operator[] | ( | long long | i | ) | [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t RWWString::operator[] | ( | unsigned long | i | ) | const [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t RWWString::operator[] | ( | unsigned int | i | ) | const [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t RWWString::operator[] | ( | unsigned short | i | ) | const [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t RWWString::operator[] | ( | long | i | ) | const [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t RWWString::operator[] | ( | int | i | ) | const [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t RWWString::operator[] | ( | short | i | ) | const [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t & RWWString::operator[] | ( | unsigned long | i | ) | [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t & RWWString::operator[] | ( | unsigned int | i | ) | [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t & RWWString::operator[] | ( | unsigned short | i | ) | [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t & RWWString::operator[] | ( | long | i | ) | [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t & RWWString::operator[] | ( | int | i | ) | [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
wchar_t & RWWString::operator[] | ( | short | i | ) | [inline] |
Returns the i th character in self. The index i must be between 0 and the length of the string less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
Prepends the first len characters of str to self. If len is greater than the length of str, the entire string is prepended. Returns a reference to self.
RWWString & RWWString::prepend | ( | const std::wstring & | str, | |
size_t | len | |||
) | [inline] |
Prepends the first len characters of str to self. If len is greater than the length of str, the entire string is prepended. Returns a reference to self.
Prepends a copy of the string str to self. Returns a reference to self.
RWWString & RWWString::prepend | ( | const std::wstring & | str | ) | [inline] |
Prepends a copy of the string str to self. Returns a reference to self.
RWWString & RWWString::prepend | ( | const wchar_t * | str, | |
size_t | len | |||
) | [inline] |
Prepends a copy of the character string str to self. Exactly len characters are copied, including any embedded nulls. Hence, the buffer pointed to by str must be at least len characters long. Returns a reference to self.
RWWString & RWWString::prepend | ( | const wchar_t * | str | ) | [inline] |
Prepends a copy of the null-terminated character string pointed to by str to self. Returns a reference to self.
RWWString & RWWString::prepend | ( | wchar_t | c, | |
size_t | count = 1 | |||
) | [inline] |
Prepends count copies of character c to self. Returns a reference to self.
std::istream& RWWString::readFile | ( | std::istream & | strm | ) |
Reads characters from the input stream strm, replacing the previous contents of self, until EOF
is reached. The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object. Null characters are treated the same as other characters.
std::istream & RWWString::readLine | ( | std::istream & | strm, | |
bool | skipWhite = true | |||
) | [inline] |
Reads characters from the input stream strm, replacing the previous contents of self, until a newline (or an EOF
) is encountered. The newline is removed from the input stream but is not stored. The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object. Null characters are treated the same as other characters. If the skipWhite argument is true
, then whitespace is skipped (using the iostream library manipulator ws
) before saving characters.
std::istream & RWWString::readString | ( | std::istream & | strm | ) | [inline] |
Reads characters from the input stream strm, replacing the previous contents of self, until an EOF
or null terminator is encountered. The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object.
std::istream& RWWString::readToDelim | ( | std::istream & | strm, | |
wchar_t | delim | |||
) | [inline] |
Reads characters from the input stream strm, replacing the previous contents of self, until an EOF
or the delimiting character delim is encountered. The delimiter is removed from the input stream but is not stored. The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object. Null characters are treated the same as other characters.
std::istream& RWWString::readToDelim | ( | std::istream & | strm | ) | [inline] |
The equivalant of calling:
RWWString::readToDelim(strm, L'\n');
std::wistream & RWWString::readToken | ( | std::wistream & | strm | ) | [inline] |
White space is skipped before reading from strm. Characters are then read from the input stream strm, replacing previous contents of self, until trailing white space or EOF
is encountered. The white space is left on the input stream. Null characters are treated the same as other characters. White space is identified by the Standard C Library function isspace()
.
std::istream& RWWString::readToken | ( | std::istream & | strm | ) |
Whitespace is skipped before storing characters into a wide string. Characters are then read from the input stream strm, replacing previous contents of self, until trailing whitespace or an EOF
is encountered. The trailing whitespace is left on the input stream. Only US-ASCII whitespace characters are recognized, as defined by the Standard C Library function isspace()
. The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object.
RWWString & RWWString::remove | ( | size_t | pos, | |
size_t | len | |||
) | [inline] |
Removes len wide characters or to the end of string (whichever comes first) starting at the position pos, which must be no greater than length(). Returns a reference to self.
RWWString & RWWString::remove | ( | size_t | pos | ) | [inline] |
Removes the characters to the end of string, starting at the position pos, which must be no greater than length(). Returns a reference to self.
RWWString & RWWString::replace | ( | size_t | pos, | |
size_t | len, | |||
const RWWString & | str, | |||
size_t | strLen | |||
) | [inline] |
Replaces the substring beginning at pos and of length len with the first strLen characters of string str. If the sum of pos and len is greater than the length of self, the substring replaced is from pos to end of string. If strLen is greater than the length of str, all of str is used.
Returns a reference to self.
RWBoundsErr | If pos is greater than the length of self. |
RWWString & RWWString::replace | ( | size_t | pos, | |
size_t | len, | |||
const std::wstring & | str, | |||
size_t | strLen | |||
) | [inline] |
Replaces the substring beginning at pos and of length len with the first strLen characters of string str. If the sum of pos and len is greater than the length of self, the substring replaced is from pos to end of string. If strLen is greater than the length of str, all of str is used.Returns a reference to self.
RWBoundsErr | If pos is greater than the length of self. |
RWWString & RWWString::replace | ( | size_t | pos, | |
size_t | len, | |||
const wchar_t * | str, | |||
size_t | strLen | |||
) | [inline] |
Replaces the substring beginning at pos and of length len with strLen characters from str. If the sum of pos and len is greater than the length of self, the substring replaced is from pos to end of string.
Returns a reference to self.
RWBoundsErr | If pos is greater than the length of self. |
Replaces the substring beginning at pos and of length len with the string str. If the sum of pos and len is greater than the length of self, the substring replaced is from pos to end of string.
Returns a reference to self.
RWBoundsErr | If pos is greater than the length of self. |
RWWString & RWWString::replace | ( | size_t | pos, | |
size_t | len, | |||
const std::wstring & | str | |||
) | [inline] |
Replaces the substring beginning at pos and of length len with the string str. If the sum of pos and len is greater than the length of self, the substring replaced is from pos to end of string.Returns a reference to self.
RWBoundsErr | If pos is greater than the length of self. |
RWWString & RWWString::replace | ( | size_t | pos, | |
size_t | len, | |||
const wchar_t * | str | |||
) | [inline] |
Replaces the substring beginning at pos and of length len with the null-terminated string str. If the sum of pos and len is greater than the length of self, the substring replaced is from pos to end of string.
Returns a reference to self.
RWBoundsErr | If pos is greater than the length of self. |
void RWWString::resize | ( | size_t | len | ) | [inline] |
Changes the length of self to len characters, adding blanks (i.e., L' '
) or truncating as necessary.
static size_t RWWString::resizeIncrement | ( | size_t | ri = 16 |
) | [inline, static] |
size_t RWWString::rindex | ( | const RWWString & | pat, | |
size_t | patlen, | |||
size_t | end, | |||
caseCompare | cmp | |||
) | const [inline] |
Pattern matching. Searches for the last occurrence of the first patlen characters from pat in self that occurs before index end and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
RW_COPY_ON_WRITE_STRING
is defined.size_t RWWString::rindex | ( | const std::wstring & | pat, | |
size_t | patlen, | |||
size_t | end, | |||
caseCompare | cmp | |||
) | const [inline] |
Pattern matching. Searches for the last occurrence of the first patlen characters from pat in self that occurs before index end and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
RW_COPY_ON_WRITE_STRING
is defined.size_t RWWString::rindex | ( | const wchar_t * | pat, | |
size_t | patlen, | |||
size_t | end, | |||
caseCompare | cmp | |||
) | const [inline] |
Pattern matching. Searches for the last occurrence of the first patlen characters from pat in self that occurs before index end and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
RW_COPY_ON_WRITE_STRING
is defined.size_t RWWString::rindex | ( | const RWWString & | pat, | |
size_t | end = RW_NPOS , |
|||
caseCompare | cmp = exact | |||
) | const [inline] |
Pattern matching. Searches for the last occurrence of pat in self that occurs before index end and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
RW_COPY_ON_WRITE_STRING
is defined.size_t RWWString::rindex | ( | const std::wstring & | pat, | |
size_t | end = RW_NPOS , |
|||
caseCompare | cmp = exact | |||
) | const [inline] |
Pattern matching. Searches for the last occurrence of pat in self that occurs before index end and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
RW_COPY_ON_WRITE_STRING
is defined.size_t RWWString::rindex | ( | const wchar_t * | pat, | |
size_t | end = RW_NPOS , |
|||
caseCompare | cmp = exact | |||
) | const [inline] |
Pattern matching. Searches for the last occurrence of the null-terminated string pat in self that occurs before index end and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
RW_COPY_ON_WRITE_STRING
is defined.size_t RWWString::rindex | ( | const wchar_t * | pat, | |
caseCompare | cmp | |||
) | const [inline] |
Pattern matching. Searches for the last occurrence of the null-terminated string pat in self and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to cmp.
RW_COPY_ON_WRITE_STRING
is defined.const std::wstring& RWWString::std | ( | ) | const [inline] |
Returns the underlying std::wstring representation of self.
RW_COPY_ON_WRITE_STRING
is defined.std::wstring& RWWString::std | ( | ) |
Returns the underlying std::wstring representation of self.
RW_COPY_ON_WRITE_STRING
is defined.ConstSubString RWWString::strip | ( | stripType | st = trailing , |
|
wchar_t | c = L' ' | |||
) | const |
Returns a substring of self where the character c has been stripped off the beginning, end, or both ends of the string, depending on st.
Returns a substring of self where the character c has been stripped off the beginning, end, or both ends of the string, depending on st.
ConstSubString RWWString::subString | ( | const wchar_t * | pat, | |
size_t | start = 0 , |
|||
caseCompare | cmp = exact | |||
) | const |
Starting at start, returns a substring representing the first occurrence of the null-terminated string pat in self. If pat is not found, a null substring instance is returned.
SubString RWWString::subString | ( | const wchar_t * | pat, | |
size_t | start = 0 , |
|||
caseCompare | cmp = exact | |||
) |
Starting at start, returns a substring representing the first occurrence of the null-terminated string pat in self. If pat is not found, a null substring instance is returned.
void RWWString::swap | ( | RWWString & | str | ) | [inline] |
Swaps the contents of str with self.
RWCString RWWString::toAscii | ( | ) | const |
Returns an ASCII representation of self. Any non-US-ASCII characters in self simply have the high bits stripped off. Use isAscii() to determine whether this function is safe to use.
void RWWString::toLower | ( | ) | [inline] |
Changes all upper-case letters in self to lower-case. Uses the C library function towlower()
.
RWCString RWWString::toMultiByte | ( | ) | const |
Returns a multibyte representation of self.
wcstombs()
doesn't handle them. Returns an empty string if the wide string cannot be translated (for instance, if the correct locale is not set to convert a specific character). void RWWString::toUpper | ( | ) | [inline] |
Changes all lower-case letters in self to upper-case. Uses the C library function towupper()
.
bool operator!= | ( | const RWWString & | lhs, | |
const RWWConstSubString & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs == rhs)
bool operator!= | ( | const RWWConstSubString & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs == rhs)
bool operator!= | ( | const RWWString & | lhs, | |
const RWWSubString & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs == rhs)
bool operator!= | ( | const RWWSubString & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs == rhs)
bool operator!= | ( | const std::wstring & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs == rhs)
bool operator!= | ( | const RWWString & | lhs, | |
const std::wstring & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs == rhs)
bool operator!= | ( | const wchar_t * | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs == rhs)
bool operator!= | ( | const RWWString & | lhs, | |
const wchar_t * | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs == rhs)
Concatenates lhs and rhs and returns the resulting string.
Concatenates lhs and rhs and returns the resulting string.
Concatenates the null-terminated string lhs and rhs and returns the resulting string.
Concatenates lhs and the null-terminated string rhs and returns the resulting string.
Concatenates lhs and rhs and returns the resulting string.
bool operator< | ( | const std::wstring & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator< | ( | const RWWString & | lhs, | |
const std::wstring & | rhs | |||
) | [related] |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator< | ( | const wchar_t * | lhs, | |
const RWWString & | rhs | |||
) | [related] |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator< | ( | const RWWString & | lhs, | |
const wchar_t * | rhs | |||
) | [related] |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
Saves string str to an RWFile.
RWvostream & operator<< | ( | RWvostream & | vos, | |
const RWWString & | str | |||
) | [related] |
Saves string str to a virtual stream.
std::ostream & operator<< | ( | std::ostream & | os, | |
const RWWString & | s | |||
) | [related] |
Outputs an RWWString on ostream os as a sequence of bytes. This is done literally from the byte content of the characters.
bool operator<= | ( | const std::wstring & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(rhs < lhs)
bool operator<= | ( | const RWWString & | lhs, | |
const std::wstring & | rhs | |||
) | [related] |
The equivalent of calling:
!(rhs < lhs)
bool operator<= | ( | const wchar_t * | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(rhs < lhs)
bool operator<= | ( | const RWWString & | lhs, | |
const wchar_t * | rhs | |||
) | [related] |
The equivalent of calling:
!(rhs < lhs)
bool operator<= | ( | const RWWString & | rhs | ) | const [related] |
The equivalent of calling:
!(rhs < *this)
bool operator== | ( | const RWWString & | lhs, | |
const RWWConstSubString & | rhs | |||
) | [related] |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator== | ( | const RWWConstSubString & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator== | ( | const RWWString & | lhs, | |
const RWWSubString & | rhs | |||
) | [related] |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator== | ( | const RWWSubString & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator== | ( | const std::wstring & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator== | ( | const RWWString & | lhs, | |
const std::wstring & | rhs | |||
) | [related] |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator== | ( | const wchar_t * | lhs, | |
const RWWString & | rhs | |||
) | [related] |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator== | ( | const RWWString & | lhs, | |
const wchar_t * | rhs | |||
) | [related] |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
bool operator> | ( | const std::wstring & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(rhs < lhs)
bool operator> | ( | const RWWString & | lhs, | |
const std::wstring & | rhs | |||
) | [related] |
The equivalent of calling:
!(rhs < lhs)
bool operator> | ( | const wchar_t * | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(rhs < lhs)
bool operator> | ( | const RWWString & | lhs, | |
const wchar_t * | rhs | |||
) | [related] |
The equivalent of calling:
!(rhs < lhs)
bool operator>= | ( | const std::wstring & | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs < rhs)
bool operator>= | ( | const RWWString & | lhs, | |
const std::wstring & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs < rhs)
bool operator>= | ( | const wchar_t * | lhs, | |
const RWWString & | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs < rhs)
bool operator>= | ( | const RWWString & | lhs, | |
const wchar_t * | rhs | |||
) | [related] |
The equivalent of calling:
!(lhs < rhs)
bool operator>= | ( | const RWWString & | rhs | ) | const [related] |
The equivalent of calling:
!(*this < rhs)
Restores a wide character string into cstr from an RWFile, replacing the previous contents of cstr.
If an error occurs while extracting the string, the operator returns the original string contents unmodified. Check the file to determine if an error occurred on extraction.
RWvistream & operator>> | ( | RWvistream & | str, | |
RWWString & | cstr | |||
) | [related] |
Restores a wide character string into cstr from a virtual stream, replacing the previous contents of cstr.
If an error occurs while extracting the string, the operator returns the original string contents unmodified. Check the virtual stream to determine if an error occurred on extraction.
std::istream & operator>> | ( | std::istream & | s, | |
RWWString & | str | |||
) | [related] |
Calls str.readToken(s). That is, a token is read from the input stream s.
Returns the result of applying wsxfrm()
to str to allow quicker collation than RWWString::collate(). Provided only on platforms that provide wsxfrm()
.
RWWString strXForm | ( | const std::wstring & | str | ) | [related] |
Returns a copy of str with all upper-case characters replaced with lower-case characters. This function is the equivalent of calling:
RWWString tmp(str); tmp.toLower();
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.