Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress C++ API Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::CSubString

Group:  Core String Manipulation


Does not inherit

Local Index

Members

Header File

#include rwsf/core/CString.h

Description

The class rwsf::CSubString allows some subsection of an rwsf::CString 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 in your behalf by such functions as rwsf::CString::strip() or the overloaded function call operator taking a regular expression as an argument. There are no public constructors rwsf::CSubStrings are constructed by various functions of the rwsf::CString 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.

Deprecated. Use std::string instead.

Public Member Functions

const char *
data() const;
bool
isNull() const;
size_t
length() const;
size_t
start() const;
void
toLower();
void
toUpper();

Protected Member Functions

void
assertElement(size_t i) const;

Public Operators

int
operator!() const;
char &
operator()(size_t i);
char
operator()(size_t i) const;
char &
operator[](short i);
char &
operator[](int i);
char &
operator[](long i);
char &
operator[](unsigned short i);
char &
operator[](unsigned int i);
char &
operator[](unsigned long i);
char &
operator[](rwsflonglong i);
char &
operator[](rwsfulonglong i);
char
operator[](short i) const;
char
operator[](int i) const;
char
operator[](long i) const;
char
operator[](unsigned short i) const;
char
operator[](unsigned int i) const;
char
operator[](unsigned long i) const;
char
operator[](rwsflonglong i) const;
char
operator[](rwsfulonglong i) const;
CSubString &
operator=(const char *);
CSubString &
operator=(const CString &);
CSubString &
operator=(const CSubString &);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.