SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Allows some subsection of an RWWString to be addressed by defining a starting position and an extent. More...
#include <rw/wstring.h>
Public Member Functions | |
RWWConstSubString (const RWWConstSubString &str) | |
RWWConstSubString (const RWWSubString &str) | |
bool | isNull () const |
size_t | length () const |
int | operator! () const |
wchar_t | operator() (size_t i) const |
wchar_t | operator[] (int i) const |
wchar_t | operator[] (long i) const |
wchar_t | operator[] (long long i) const |
wchar_t | operator[] (short i) const |
wchar_t | operator[] (unsigned int i) const |
wchar_t | operator[] (unsigned long i) const |
wchar_t | operator[] (unsigned long long i) const |
wchar_t | operator[] (unsigned short i) const |
size_t | start () const |
Friends | |
class | RWWString |
class | RWWSubString |
Related Symbols | |
(Note that these are not member symbols.) | |
bool | operator!= (const RWWConstSubString &lhs, const RWWConstSubString &rhs) |
bool | operator!= (const RWWConstSubString &lhs, const wchar_t *rhs) |
bool | operator!= (const wchar_t *lhs, const RWWConstSubString &rhs) |
bool | operator== (const RWWConstSubString &lhs, const RWWConstSubString &rhs) |
bool | operator== (const RWWConstSubString &lhs, const wchar_t *rhs) |
bool | operator== (const wchar_t *lhs, const RWWConstSubString &rhs) |
The class RWWConstSubString allows some subsection of an RWWString 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 RWWString::strip(). There are no public constructors other than two that allow you to create an RWWConstSubString from an existing RWWSubString or RWWConstSubString. In general, RWWConstSubString objects are constructed by various functions of the RWWString 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 (assuming your platform displays wide characters as US-ASCII if they are in the US-ASCII character set):
|
inline |
Constructs an RWWConstSubString from an existing RWWSubString. The resulting substring references the same start and extent of the RWWString associated with str.
|
inline |
|
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/wstring.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. 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. |
wchar_t RWWConstSubString::operator[] | ( | long long | i | ) | const |
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. |
wchar_t RWWConstSubString::operator[] | ( | unsigned long long | i | ) | const |
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 starting element of the substring.
|
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 RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
|
related |
Returns true
if lhs is lexicographically equal to rhs. Otherwise returns false
. Use member RWWString::collate() or RWWString::strXForm() for locale-sensitive comparisons.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |