SourcePro® 2022.1 |
SourcePro® API Reference Guide |
Allows some subsection of an RWCString to be addressed by defining a starting position and an extent. More...
#include <rw/cstring.h>
Public Member Functions | |
bool | isNull () const |
size_t | length () const |
int | operator! () const |
char & | operator() (size_t i) |
char | operator() (size_t i) const |
RWCSubString & | operator= (const RWCSubString &str) |
RWCSubString & | operator= (const RWCConstSubString &str) |
RWCSubString & | operator= (const RWCString &str) |
RWCSubString & | operator= (const std::string &str) |
RWCSubString & | operator= (const char *str) |
char & | operator[] (char i) |
char | operator[] (char i) const |
char & | operator[] (signed char i) |
char | operator[] (signed char i) const |
char & | operator[] (short i) |
char | operator[] (short i) const |
char & | operator[] (int i) |
char | operator[] (int i) const |
char & | operator[] (long i) |
char | operator[] (long i) const |
char & | operator[] (long long i) |
char | operator[] (long long i) const |
char & | operator[] (unsigned char i) |
char | operator[] (unsigned char i) const |
char & | operator[] (unsigned short i) |
char | operator[] (unsigned short i) const |
char & | operator[] (unsigned int i) |
char | operator[] (unsigned int i) const |
char & | operator[] (unsigned long i) |
char | operator[] (unsigned long i) const |
char & | operator[] (unsigned long long i) |
char | operator[] (unsigned long long i) const |
size_t | start () const |
void | toLower () |
void | toUpper () |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const RWCSubString &lhs, const RWCSubString &rhs) |
bool | operator!= (const RWCSubString &lhs, const RWCConstSubString &rhs) |
bool | operator!= (const RWCConstSubString &lhs, const RWCSubString &rhs) |
bool | operator!= (const RWCSubString &lhs, const std::string &rhs) |
bool | operator!= (const std::string &lhs, const RWCSubString &rhs) |
bool | operator!= (const RWCSubString &lhs, const char *rhs) |
bool | operator!= (const char *lhs, const RWCSubString &rhs) |
bool | operator!= (const RWCSubString &lhs, char rhs) |
bool | operator!= (char lhs, const RWCSubString &rhs) |
bool | operator< (const RWCSubString &lhs, const RWCSubString &rhs) |
bool | operator< (const RWCSubString &lhs, const RWCConstSubString &rhs) |
bool | operator< (const RWCConstSubString &lhs, const RWCSubString &rhs) |
bool | operator< (const RWCSubString &lhs, const std::string &rhs) |
bool | operator< (const std::string &lhs, const RWCSubString &rhs) |
bool | operator< (const RWCSubString &lhs, const char *rhs) |
bool | operator< (const char *lhs, const RWCSubString &rhs) |
bool | operator< (const RWCSubString &lhs, char rhs) |
bool | operator< (char lhs, const RWCSubString &rhs) |
bool | operator<= (const RWCSubString &lhs, const RWCSubString &rhs) |
bool | operator<= (const RWCSubString &lhs, const RWCConstSubString &rhs) |
bool | operator<= (const RWCConstSubString &lhs, const RWCSubString &rhs) |
bool | operator<= (const RWCSubString &lhs, const std::string &rhs) |
bool | operator<= (const std::string &lhs, const RWCSubString &rhs) |
bool | operator<= (const RWCSubString &lhs, const char *rhs) |
bool | operator<= (const char *lhs, const RWCSubString &rhs) |
bool | operator<= (const RWCSubString &lhs, char rhs) |
bool | operator<= (char lhs, const RWCSubString &rhs) |
bool | operator== (const RWCSubString &lhs, const RWCSubString &rhs) |
bool | operator== (const RWCSubString &lhs, const RWCConstSubString &rhs) |
bool | operator== (const RWCConstSubString &lhs, const RWCSubString &rhs) |
bool | operator== (const RWCSubString &lhs, const std::string &rhs) |
bool | operator== (const std::string &lhs, const RWCSubString &rhs) |
bool | operator== (const RWCSubString &lhs, const char *rhs) |
bool | operator== (const char *lhs, const RWCSubString &rhs) |
bool | operator== (const RWCSubString &lhs, char rhs) |
bool | operator== (char lhs, const RWCSubString &rhs) |
bool | operator> (const RWCSubString &lhs, const RWCSubString &rhs) |
bool | operator> (const RWCSubString &lhs, const RWCConstSubString &rhs) |
bool | operator> (const RWCConstSubString &lhs, const RWCSubString &rhs) |
bool | operator> (const RWCSubString &lhs, const std::string &rhs) |
bool | operator> (const std::string &lhs, const RWCSubString &rhs) |
bool | operator> (const RWCSubString &lhs, const char *rhs) |
bool | operator> (const char *lhs, const RWCSubString &rhs) |
bool | operator> (const RWCSubString &lhs, char rhs) |
bool | operator> (char lhs, const RWCSubString &rhs) |
bool | operator>= (const RWCSubString &lhs, const RWCSubString &rhs) |
bool | operator>= (const RWCSubString &lhs, const RWCConstSubString &rhs) |
bool | operator>= (const RWCConstSubString &lhs, const RWCSubString &rhs) |
bool | operator>= (const RWCSubString &lhs, const std::string &rhs) |
bool | operator>= (const std::string &lhs, const RWCSubString &rhs) |
bool | operator>= (const RWCSubString &lhs, const char *rhs) |
bool | operator>= (const char *lhs, const RWCSubString &rhs) |
bool | operator>= (const RWCSubString &lhs, char rhs) |
bool | operator>= (char lhs, const RWCSubString &rhs) |
The class RWCSubString allows some subsection of an RWCString to be addressed by defining a starting position and an extent. For example the 7th through the 11th elements, inclusive, would have a starting position of 7 and an extent of 5. The specification of a starting position and extent can also be done on your behalf by such functions as RWCString::strip() or the overloaded function call operator taking a regular expression as an argument. There are no public constructors – RWCSubStrings are constructed by various functions of the RWCString class and then destroyed immediately.
A zero length substring is one with a defined starting position and an extent of zero. It can be thought of as starting just before the indicated character, but not including it. It can be used as an lvalue. A null substring is also legal and is frequently used to indicate that a requested substring, perhaps through a search, does not exist. A null substring can be detected with member function isNull(). However, it cannot be used as an lvalue.
Program output:
|
inline |
Returns true
if this
is a null substring.
|
inline |
Returns the extent (i.e., length) of the substring.
|
inline |
Returns true
if this
is a null substring.
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK
before including <rw/cstring.h>
.
RWBoundsErr | if RWBOUNDS_CHECK is defined and the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK
before including <rw/cstring.h>
.
RWBoundsErr | if RWBOUNDS_CHECK is defined and the index is out of range. |
|
inline |
Assignment from an RWCSubString. Example:
Copies 5 characters of a
's data into the substring b(2,3)
. The number of elements need not match; if they differ, b
is resized appropriately. If self is the null substring, then the statement has no effect. Returns a reference to self.
|
inline |
Assignment from an RWCConstSubString. Example:
Copies 5 characters of a
's data into the substring b(2,3)
. The number of elements need not match; if they differ, b
is resized appropriately. If self is the null substring, then the statement has no effect. Returns a reference to self.
|
inline |
Assignment from an RWCString. Example:
Copies a
's data into the substring b(2,3)
. The number of elements need not match; if they differ, b
is resized appropriately. If self is the null substring, then the statement has no effect. Returns a reference to self.
|
inline |
Assignment from an std::string. Example:
Copies a
's data into the substring b(2,3)
. The number of elements need not match; if they differ, b
is resized appropriately. If self is the null substring, then the statement has no effect. Returns a reference to self.
|
inline |
Assignment from a character string. Example:
The number of characters selected need not match; if they differ, str
is resized appropriately. If self is the null substring, then the statement has no effect. Returns a reference to self.
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the i th character of the substring. The index i must be between zero and the length of the substring less one. i is converted to a size_t
and bounds checking is performed.
RWBoundsErr | if the index is out of range. |
|
inline |
Returns the index of the starting element of the substring.
|
inline |
Changes all upper-case letters in self to lower-case. Uses the C++ Standard Library function std::tolower().
|
inline |
Changes all lower-case letters in self to upper-case. Uses the C++ Standard Library function std::toupper().
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs lexicographically precedes rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs is empty or the first character in lhs is less than rhs. Otherwise returns false.
|
related |
Returns true if the length of rhs is at least one and the first character of rhs is greater than lhs.
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWCString::collate() or RWCString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs has a length of one and the first character lhs is identical to the char rhs.
|
related |
Returns true
if rhs has a length of one and the first character rhs is identical to the char lhs.
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
|
related |
The equivalent of calling:
Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |