home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++)))) RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++))))
-
-
-
- NNNNaaaammmmeeee
- RWCSubString - Rogue Wave library class
-
- SSSSyyyynnnnooooppppssssiiiissss
- #include <rw/cstring.h>
-
-
-
- RWCString s("test string");
- s(6,3); // "tri"
-
-
-
-
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- The class RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg allows some subsection of an RRRRWWWWCCCCSSSSttttrrrriiiinnnngggg to be
- addressed by defining a ssssttttaaaarrrrttttiiiinnnngggg ppppoooossssiiiittttiiiioooonnnn and an eeeexxxxtttteeeennnntttt. 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
- RRRRWWWWCCCCSSSSttttrrrriiiinnnngggg::::::::ssssttttrrrriiiipppp(((()))) or the overloaded function call operator taking a
- regular expression as an argument. There are no public constructors --
- RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnnggggs are constructed by various functions of the RRRRWWWWCCCCSSSSttttrrrriiiinnnngggg class
- and then destroyed immediately. A zzzzeeeerrrroooo lllleeeennnnggggtttthhhh 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 iiiissssNNNNuuuullllllll(((()))).... However, it cannot be used as an lvalue.
-
- PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
- None
-
- EEEExxxxaaaammmmpppplllleeee
- #include <rw/cstring.h>
- #include <rw/rstream.h>
- main(){
- RWCString s("What I tell you is true.");
- // Create a substring and use it as an lvalue:
- s(19, 0) = "three times ";
- cout << s << endl;
- }
-
-
- PPPPrrrrooooggggrrrraaaammmm oooouuuuttttppppuuuutttt::::
-
- What I tell you is three times true.
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++)))) RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++))))
-
-
-
-
-
- AAAAssssssssiiiiggggnnnnmmmmeeeennnntttt OOOOppppeeeerrrraaaattttoooorrrrssss
- RWCSubString&
- ooooppppeeeerrrraaaattttoooorrrr====(const RWCString&);
-
-
- Assignment from an RRRRWWWWCCCCSSSSttttrrrriiiinnnngggg. The statements:
-
- RWCString a;
-
-
-
- RWCString b;
- b(2, 3) = a;
-
-
- will copy aaaa's data into the substring bbbb((((2222,,,,3333)))). The number of elements
- need not match: if they differ, bbbb will be resized appropriately. Sets
- self's extent to be the length of the assigned RRRRWWWWCCCCSSSSttttrrrriiiinnnngggg.... If self is the
- null substring, then the statement has no effect. Returns a reference to
- self.
-
- RWCSubString&
- ooooppppeeeerrrraaaattttoooorrrr====(const RWCSubString&);
-
-
- Assignment from an RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg. The statements:
-
- RWCString a;
-
-
-
- RWCString b;
- b(2, 3) = a(5,5);
-
-
- will copy 5 characters of aaaa's data into the substring bbbb((((2222,,,,3333)))). The number
- of elements need not match: if they differ, bbbb will be resized
- appropriately. Sets self's extent to be the extent of the assigned
- RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg. If self is the null substring, then the statement has no
- effect. Returns a reference to self.
-
- RWCSubString&
- ooooppppeeeerrrraaaattttoooorrrr====(const char*);
-
-
- Assignment from a character string. Example:
-
- RWCString str("Mary had a lamb");
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++)))) RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++))))
-
-
-
- char dat[] = "Perrier";
- str(11,4) = dat; // "Mary had a Perrier"
-
-
- Note that the number of characters selected need not match: if they
- differ, ssssttttrrrr will be resized appropriately. Sets self's extent to be the
- ssssttttrrrrlllleeeennnn(((()))) of the assigned character string. If self is the null
- substring, then the statement has no effect. Returns a reference to
- self.
-
- IIIInnnnddddeeeexxxxiiiinnnngggg OOOOppppeeeerrrraaaattttoooorrrrssss
- char&
- ooooppppeeeerrrraaaattttoooorrrr[[[[]]]](size_t i);
- char
- ooooppppeeeerrrraaaattttoooorrrr[[[[]]]](size_t i) const;
-
-
- Returns the iiiith character of the substring. The first variant can be
- used as an lvalue, the second cannot. The index iiii must be between zero
- and the length of the substring, less one. Bounds checking is performed:
- if the index is out of range, then an exception of type RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr will
- occur.
-
- char&
- ooooppppeeeerrrraaaattttoooorrrr(((())))(size_t i);
- char
- ooooppppeeeerrrraaaattttoooorrrr(((())))(size_t i) const;
-
-
- Returns the iiiith character of the substring. The first variant can be
- used as an lvalue, the second cannot. The index iiii must be between zero
- and the length of the substring, less one. Bounds checking is enabled by
- defining the pre-processor macro RRRRWWWWBBBBOOOOUUUUNNNNDDDDSSSS____CCCCHHHHEEEECCCCKKKK before including
- <<<<rrrrwwww////ccccssssttttrrrriiiinnnngggg....hhhh>>>>. In this case, if the index is out of range, then an
- exception of type RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr will occur.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
- RWBoolean
- iiiissssNNNNuuuullllllll() const;
-
-
- Returns TTTTRRRRUUUUEEEE if this is a null substring.
-
- size_t
- lllleeeennnnggggtttthhhh() const;
-
-
- Returns the extent (iiii....eeee...., length) of the RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg.
-
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!() const;
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++)))) RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++))))
-
-
-
- Returns TTTTRRRRUUUUEEEE if this is a null substring.
-
- size_t
- ssssttttaaaarrrrtttt() const;
-
-
- Returns the starting element of the RRRRWWWWCCCCSSSSuuuubbbbSSSSttttrrrriiiinnnngggg.
-
- void
- ttttooooLLLLoooowwwweeeerrrr();
-
-
- Changes all upper-case letters in self to lower-case. Uses the standard
- C library function ttttoooolllloooowwwweeeerrrr(((()))).
-
- void
- ttttooooUUUUppppppppeeeerrrr();
-
-
- Changes all lower-case letters in self to upper-case. Uses the standard
- C library function ttttoooouuuuppppppppeeeerrrr(((()))).
-
- GGGGlllloooobbbbaaaallll LLLLooooggggiiiiccccaaaallll OOOOppppeeeerrrraaaattttoooorrrrssss
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const RWCSubString&, const RWCSubString&);
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const RWCString&, const RWCSubString&);
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const RWCSubString&, const RWCString& );
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const char*, const RWCSubString&);
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const RWCSubString&, const char* );
-
-
- Returns TTTTRRRRUUUUEEEE if the substring is lexicographically equal to the character
- string or RRRRWWWWCCCCSSSSttttrrrriiiinnnngggg argument. Case sensitivity is eeeexxxxaaaacccctttt.
-
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const RWCString&, const RWCString& );
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const RWCString&, const RWCSubString&);
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const RWCSubString&, const RWCString& );
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const char*, const RWCString& );
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const RWCString&, const char* );
-
-
- Returns the negation of the respective ooooppppeeeerrrraaaattttoooorrrr========(((()))).
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-