Accessing SubStrings
In the Internationalization Module,
RWUSubString and
RWUConstSubString provide access to a range of characters within a referenced
RWUString:
RWUSubString allows read-write access to a range of code units within a referenced
RWUString.
RWUConstSubString allows read-only access to a range of code units within a referenced
RWUString.
The range within a referenced
RWUString is defined by a starting position and an extent. For example, the
7th through the
11th elements, inclusive, would have a starting position of
6 and an extent of
5.
There are no public constructors for substrings. Substrings are constructed by various functions of the
RWUString class. Typically, substrings are created and used anonymously, then destroyed immediately. For example:
RWUString str("Hello World");
str(6, 5) = "Mom";