### I0String

  The I0String class provides arrays of characters. Objects of the I0String class are functionally equivalent to objects of the class IString with one major distinction: I0Strings are indexed starting at 0 instead of 1.
  Note: A consequence of starting indexes at 0 is that you can no longer use the search functions as if they were boolean. For example:

      a0String.indexOf( anotherString ) != a0String.includes( anotherString ).

  You can freely intermix IStrings and I0Strings in a program. You can assign objects of one class values of the other type. You can pass objects of either class as parameters to functions requiring the other type.

  Attention: UINT_MAX is a reserved value for I0String. If you use UINT_MAX for the startPos parameter in I0String functions, unpredictable results can occur.

### I0String - Member Functions and Data by Group

### Constructors & Destructor

You can construct objects of this class in the following ways:

- Construct a NULL string.
- Construct a string with the ASCII representation of a given numeric value, supporting all variations of integer and double.
- Construct a string with a copy of the specified character data, supporting ASCIIZ strings, characters, and IStrings. The character data passed is converted to its ASCII representation.
- Construct a string with contents that consist of copies of up to three buffers of arbitrary data (void*). Optionally, you only need to provide the length, in which case the IString contents are initialized to a specified pad character. The default character is a blank.

These constructors can throw exceptions under the following conditions:

- Memory allocation errors

  Many factors dynamically allocate space and these allocation requests may fail. If so, the Open Class Library translates memory allocation errors into exceptions. Generally, such errors do not occur until you allocate an astronomical amount of storage.

- Out-of-range errors

  These occur if you attempt to construct an IString with a length greater than UINT_MAX.

~I0String

      public:
      ~I0String()

  Delete the string.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

I0String
  You can construct objects of this class in the following ways:
  - Construct a NULL string.
  - Construct a string with the ASCII representation of a given numeric value, supporting all variations of integer and double.
  - Construct a string with a copy of the specified character data, supporting ASCIIZ strings, characters, and IStrings. The character data passed is converted to its ASCII representation.
  - Construct a string with contents that consist of copies of up to three buffers of arbitrary data (void*). Optionally, you only need to provide the length, in which case the IString contents are initialized to a specified pad character. The default pad character is a blank.

  These constructors can throw exceptions under the following conditions:

  - Memory allocation errors

    Many factors dynamically allocate space and these allocation requests may fail. If so, the Open Class Library translates memory allocation errors into exceptions. Generally, such errors do not occur until you allocate an astronomical amount of storage.

  - Out-of-range errors.

    These occur if you attempt to construct an IString with a length greater than UINT_MAX.

  Overload 1

      public:
      I0String(long aLong)

  Construct a string with the ASCII representation of a long numeric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      I0String(unsigned anUnsigned)

  Construct a string with the ASCII representation of an unsigned numeric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      I0String(const IString& aString)

  Construct a string with a copy of the specified IString.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      I0String(unsigned short anUnsignedShort)

  Construct a string with the ASCII representation of an unsigned short numeric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 5

      public:
      I0String(double aDouble)

  Construct a string with the ASCII representation of a double numeric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 6

      public:
      I0String(char aChar)

  Construct a string with a copy of the character. The string length is set to 1.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 7

      public:
      I0String(unsigned char anUnsignedChar)

  Construct a string with a copy of the unsigned character. The string length is set to 1.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 8

      public:
      I0String(const char* pChar)

  Construct a string with a copy of the specified ASCIIZ string.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 9

      public:
      I0String(signed char aSignedChar)

  Construct a string with a copy of the signed character. The string length is set to 1.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 10

      public:
      I0String(unsigned long anUnsignedLong)

  Construct a string with the ASCII representation of an unsigned long numeric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 11

      public:
      I0String( const void* pBuffer1,
                unsigned lenBuffer1,
                char padCharacter = ' ' )

  Construct a string with contents from one buffer of arbitrary data (void*).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 12

      public:
      I0String( const void* pBuffer1,
                unsigned lenBuffer1,
                const void* pBuffer2,
                unsigned lenBuffer2,
                char padCharacter = ' ' )

  Construct a string with contents from two buffers of arbitrary data (void*).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 13

      public:
      I0String( const void* pBuffer1,
                unsigned lenBuffer1,
                const void* pBuffer2,
                unsigned lenBuffer2,
                const void* pBuffer3,
                unsigned lenBuffer3,
                char padCharacter = ' ' )

  Construct a string with contents from three buffers of arbitrary data (void*).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 14

      public:
      I0String(unsigned long long anUnsignedLongLong)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 15

      public:
      I0String(long long aLongLong)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 16

      public:
      I0String(const unsigned char* pUnsignedChar)

  Construct a string with a copy of the specified unsigned ASCIIZ string.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 17

      public:
      I0String(const signed char* pSignedChar)

  Construct a string with a copy of the specified signed ASCIIZ string.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 18

      public:
      I0String(short aShort)

  Construct a string with the ASCII representation of a short numeric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 19

      public:
      I0String(int anInt)

  Construct a string with the ASCII representation of an integer numeric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 20

      public:
      I0String()

  Construct a NULL string.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Editing

These members are reimplemented to treat the position arguments as 0-based.

change

  Changes occurrences of a specified pattern to a specified replacement string. You can specify the number of changes to perform. The default is to change all occurrences of the pattern. You can also specify the position in the receiver at which to begin.

  The parameters are the following:

  inputString
    The pattern string as a reference to an object of type IString. The library searches for the pattern string within the receiver's data.
  pInputString
    The pattern string as a NULL-terminated string. The library searches for the pattern string within the receiver's data.
  outputString
    The replacement string as a reference to an object of type IString. It replaces the occurrences of the pattern string in the receiver's data.
  pOutputString
    The replacement string as a NULL-terminated string. It replaces the occurrences of the pattern string in the receiver's data.
  startPos
    The position to start the search at within the receiver's data. The default is 0.
  numChanges
    The number of patterns to search for and change. The default is UINT_MAX, which causes changes to all occurrences of the pattern.

  Overload 1

      public:
      I0String&
        change( const char* pPattern,
                const char* pReplacement,
                unsigned startPos = 0,
                unsigned numChanges = ( unsigned ) UINT_MAX )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      I0String&
        change( const IString& aPattern,
                const IString& aReplacement,
                unsigned startPos = 0,
                unsigned numChanges = ( unsigned ) UINT_MAX )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      static I0String
        change( const IString& aString,
                const IString& inputString,
                const IString& outputString,
                unsigned startPos = 0,
                unsigned numChanges = ( unsigned ) UINT_MAX )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      static I0String
        change( const IString& aString,
                const char* pInputString,
                const char* pOutputString,
                unsigned startPos = 0,
                unsigned numChanges = ( unsigned ) UINT_MAX )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 5

      public:
      static I0String
        change( const IString& aString,
                const IString& inputString,
                const char* pOutputString,
                unsigned startPos = 0,
                unsigned numChanges = ( unsigned ) UINT_MAX )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 6

      public:
      static I0String
        change( const IString& aString,
                const char* pInputString,
                const IString& outputString,
                unsigned startPos = 0,
                unsigned numChanges = ( unsigned ) UINT_MAX )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 7

      public:
      I0String&
        change( const char* pPattern,
                const IString& aReplacement,
                unsigned startPos = 0,
                unsigned numChanges = ( unsigned ) UINT_MAX )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 8

      public:
      I0String&
        change( const IString& aPattern,
                const char* pReplacement,
                unsigned startPos = 0,
                unsigned numChanges = ( unsigned ) UINT_MAX )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

insert

  Inserts the specified string at the specified location.

  Overload 1

      public:
      static I0String
        insert( const IString& aString,
                const char* pInsert,
                unsigned index = ( unsigned ) UINT_MAX,
                char padCharacter = ' ' )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      I0String&
        insert( const IString& aString,
                unsigned index = ( unsigned ) UINT_MAX,
                char padCharacter = ' ' )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      I0String&
        insert( const char* pString,
                unsigned index = ( unsigned ) UINT_MAX,
                char padCharacter = ' ' )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      static I0String
        insert( const IString& aString,
                const IString& anInsert,
                unsigned index = ( unsigned ) UINT_MAX,
                char padCharacter = ' ' )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

overlayWith

  Replaces a specified portion of the receiver's contents with the specified string. The overlay starts in the receiver's data at the index, which defaults to 0. If index is beyond the end of the receiver's data, it is padded with the pad character (padCharacter).

  Overload 1

      public:
      I0String&
        overlayWith( const char* pString,
                     unsigned index = 0,
                     char padCharacter = ' ' )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      static I0String
        overlayWith( const IString& aString,
                     const IString& anOverlay,
                     unsigned index = 0,
                     char padCharacter = ' ' )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      I0String&
        overlayWith( const IString& aString,
                     unsigned index = 0,
                     char padCharacter = ' ' )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      static I0String
        overlayWith( const IString& aString,
                     const char* pOverlay,
                     unsigned index = 0,
                     char padCharacter = ' ' )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

remove

  Deletes the specified portion of the string (that is, the substring) from the receiver. You can use this function to truncate an IString object at a specific position. For example:

      aString.remove(8);

  removes the substring beginning at index 8 and takes the rest of the string as a default.

  Overload 1

      public:
      static I0String
        remove( const IString& aString,
                unsigned startPos,
                unsigned numChars )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      I0String& remove(unsigned startPos)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      static I0String
        remove( const IString& aString,
                unsigned startPos )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      I0String& remove(unsigned startPos, unsigned numChars)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Forward Searches

These members are reimplemented to treat the starting position of the search as a 0-based index.

indexOf

  Returns the byte index of the first occurrence of the specified string within the receiver. If there are no occurrences, I0String::notFound is returned. In addition to IStrings, you can also specify a single character or an IStringTest.

  Overload 1

      public:
      unsigned
        indexOf( const IStringTest& aTest,
                 unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      unsigned
        indexOf( const char* pString,
                 unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      unsigned
        indexOf( const IString& aString,
                 unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      unsigned
        indexOf( char aCharacter,
                 unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

indexOfAnyBut

  Returns the index of the first character of the receiver that is not in the specified set of characters. If there are no characters, I0String::notFound is returned. Alternatively, this function returns the index of the first character that fails the test prescribed by a specified IStringTest object.

  Overload 1

      public:
      unsigned
        indexOfAnyBut( char validChar,
                       unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      unsigned
        indexOfAnyBut( const IStringTest& aTest,
                       unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      unsigned
        indexOfAnyBut( const IString& aString,
                       unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      unsigned
        indexOfAnyBut( const char* pValidChars,
                       unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

indexOfAnyOf

  Returns the index of the first character of the receiver that is a character in the specified set of characters. If there are no characters, I0String::notFound is returned. Alternatively, this function returns the index of the first character that passes the test prescribed by a specified IStringTest object.

  Overload 1

      public:
      unsigned
        indexOfAnyOf( const IStringTest& aTest,
                      unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      unsigned
        indexOfAnyOf( const IString& searchChars,
                      unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      unsigned
        indexOfAnyOf( const char* pSearchChars,
                      unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      unsigned
        indexOfAnyOf( char searchChar,
                      unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

occurrencesOf

  Returns the number of occurrences of the specified IString, char*, char, or IStringTest. If you just want a boolean test, this is slower than IString::indexOf.

  Overload 1

      public:
      unsigned
        occurrencesOf( const IStringTest& aTest,
                       unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      unsigned
        occurrencesOf( char aCharacter,
                       unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      unsigned
        occurrencesOf( const char* pString,
                       unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      unsigned
        occurrencesOf( const IString& aString,
                       unsigned startPos = 0 ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

notFound

      public:
      static const unsigned notFound

  You use this static constant in conjunction with the searching functions. It specifies the value searching functions return indicating the search failed.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Index Mapping

Use these members to convert arguments and results to the proper index base: 1 for arguments (because it relies on IString) and 0 for results (because it is 0-based itself).

adjustArg

  Adjusts the specified index from 0- to 1-based.

  Overload 1

      protected:
      static signed adjustArg(signed index)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      protected:
      static unsigned adjustArg(unsigned index)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

adjustResult

  Adjusts a function result from 1- to 0-based.

  Overload 1

      protected:
      static signed adjustResult(signed index)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      protected:
      static unsigned adjustResult(unsigned index)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Queries

These members are overridden to permit specification of the index as a 0-based value.

charType

      public:
      IStringEnum::CharType charType(unsigned index) const

  Returns the type of the character at the specified index.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator []

  Returns a reference to the specified character of the string.
  Note: If you call the non-const version of this function with an index beyond the end, the function extends the string.

  Overload 1

      public:
      const char& operator [](signed long index) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      char& operator [](signed index)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      char& operator [](unsigned long index)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      const char& operator [](signed index) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 5

      public:
      const char& operator [](unsigned long index) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 6

      public:
      char& operator [](signed long index)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 7

      public:
      const char& operator [](unsigned index) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 8

      public:
      char& operator [](unsigned index)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

subString

  Returns the specified portion of the string (that is, the substring) of the receiver.

  The parameters are the following:

  startPos
    The starting position of the substring being extracted. If this position is beyond the end of the data in the receiver, this function returns a NULL IString.
  length
    The length of the substring to be extracted. If the length extends beyond the end of the receiver's data, the returned IString is padded to the specified length with padCharacter. If you do not specify length and it defaults, this function uses the rest of the receiver's data starting from startPos for padding.
  padCharacter
    The character the function uses as padding if the requested length extends beyond the end of the receiver's data. The default padCharacter is a blank.
  You can use this function to truncate an IString object at a specific position. For example:

      aString = aString.subString(0, 7);

  returns the substring concluding with index 7 and discards the rest of the string.

  Overload 1

      public:
      I0String subString(unsigned startPos) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      I0String
        subString( unsigned startPos,
                   unsigned len,
                   char padCharacter = ' ' ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Reverse Searches

These members permit searching the string in various ways. The lastIndexOf versions correspond to forward search indexOf members but start the search from the end of the string. These members return the index of the last character in the receiver IString that satisfies the search criteria. Also, they accept an optional argument that specifies where the search is to begin. The default is to start searching at the end of the string. Searching proceeds from right to left for these members.

lastIndexOf

  Returns the index of the last occurrence of the specified string or character. The search starts at the position specified by startPos (inclusive) and proceeds backward. The returned value is in the range 0 <= x <= startPos or I0String::notFound. The default of UINT_MAX-1 starts the search at the end of the receiver's string. If the search target is not found, I0String::notFound is returned.

  If you specify 0 for startPos, the search starts at the beginning of the string. Therefore, because the search proceeds backward from its starting position, in this case the search target must occur at the beginning of the string for it to be found.

  Overload 1

      public:
      unsigned
        lastIndexOf( const char* pString,
                     unsigned endPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      unsigned
        lastIndexOf( const IStringTest& aTest,
                     unsigned startPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      unsigned
        lastIndexOf( char aCharacter,
                     unsigned endPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      unsigned
        lastIndexOf( const IString& aString,
                     unsigned endPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

lastIndexOfAnyBut

  Returns the index of the last character not in the specified string or character. The search starts at the position specified by startPos (inclusive) and proceeds backward. The default of UINT_MAX-1 starts the search at the end of the receiver's string. If the search target is not found, I0String::notFound is returned.

  If you specify 0 for startPos, the search starts at the beginning of the string. Therefore, because the search proceeds backward from its starting position, in this case the search target must occur at the beginning of the string for it to be found.

  Overload 1

      public:
      unsigned
        lastIndexOfAnyBut( const IStringTest& aTest,
                           unsigned endPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      unsigned
        lastIndexOfAnyBut( const IString& validChars,
                           unsigned endPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      unsigned
        lastIndexOfAnyBut( const char* pValidChars,
                           unsigned endPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      unsigned
        lastIndexOfAnyBut( char validChar,
                           unsigned startPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

lastIndexOfAnyOf

  Returns the index of the last character in the specified string or character. The search starts at the position specified by startPos (inclusive) and proceeds backward. The default of UINT_MAX-1 starts the search at the end of the receiver's string. If the search target is not found, I0String::notFound is returned.

  If you specify 0 for startPos, the search starts at the beginning of the string. Therefore, because the search proceeds backward from its starting position, in this case the search target must occur at the beginning of the string for it to be found.

  Overload 1

      public:
      unsigned
        lastIndexOfAnyOf( char searchChar,
                          unsigned startPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      unsigned
        lastIndexOfAnyOf( const char* pSearchChars,
                          unsigned endPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3

      public:
      unsigned
        lastIndexOfAnyOf( const IStringTest& aTest,
                          unsigned endPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      public:
      unsigned
        lastIndexOfAnyOf( const IString& searchChars,
                          unsigned endPos = ( unsigned ) ( UINT_MAX - 1 ) ) const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Word Operations

These members are reimplemented to treat the result index as 0-based.

indexOfPhrase

      public:
      unsigned
        indexOfPhrase( const IString& wordString,
                       unsigned startWord = 1 ) const

  Returns the position of the first occurrence of the specified phrase in the receiver. If the phrase is not found, I0String::notFound is returned.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

indexOfWord

      public:
      unsigned indexOfWord(unsigned wordNumber) const

  Returns the index of the specified white-space-delimited word in the receiver. If the word is not found, I0String::notFound is returned.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### I0String - Inherited Member Functions and Data

#### Inherited Public Functions

  IString

  -     ~IString()

  -     IString asDebugInfo() const

  -     double asDouble() const

  -     long asInt() const

  -     long long asLongLong() const

  -     IString asString() const

  -     unsigned long asUnsigned() const

  -     unsigned long long asUnsignedLongLong() const

  -     static IString b2c(const IString& aString)

  -     IString& b2c()

  -     IString& b2d()

  -     static IString b2d(const IString& aString)

  -     IString& b2x()

  -     static IString b2x(const IString& aString)

  -     static IString c2b(const IString& aString)

  -     IString& c2b()

  -     IString& c2d()

  -     static IString c2d(const IString& aString)

  -     IString& c2x()

  -     static IString c2x(const IString& aString)

  -     static IString
          center( const IString& aString,
                  unsigned length,
                  char padCharacter = ' ' )

  -     IString& center(unsigned length, char padCharacter = ' ')

  -     IString&
          change( const char* pInputString,
                  const char* pOutputString,
                  unsigned startPos = 1,
                  unsigned numChanges = ( unsigned ) UINT_MAX )

  -     static IString
          change( const IString& aString,
                  const IString& inputString,
                  const IString& outputString,
                  unsigned startPos = 1,
                  unsigned numChanges = ( unsigned ) UINT_MAX )

  -     static IString
          change( const IString& aString,
                  const char* pInputString,
                  const char* pOutputString,
                  unsigned startPos = 1,
                  unsigned numChanges = ( unsigned ) UINT_MAX )

  -     IString&
          change( const char* pInputString,
                  const IString& outputString,
                  unsigned startPos = 1,
                  unsigned numChanges = ( unsigned ) UINT_MAX )

  -     static IString
          change( const IString& aString,
                  const char* pInputString,
                  const IString& outputString,
                  unsigned startPos = 1,
                  unsigned numChanges = ( unsigned ) UINT_MAX )

  -     IString&
          change( const IString& inputString,
                  const char* pOutputString,
                  unsigned startPos = 1,
                  unsigned numChanges = ( unsigned ) UINT_MAX )

  -     IString&
          change( const IString& inputString,
                  const IString& outputString,
                  unsigned startPos = 1,
                  unsigned numChanges = ( unsigned ) UINT_MAX )

  -     static IString
          change( const IString& aString,
                  const IString& inputString,
                  const char* pOutputString,
                  unsigned startPos = 1,
                  unsigned numChanges = ( unsigned ) UINT_MAX )

  -     static IString
          copy( const IString& aString,
                unsigned numCopies )

  -     IString& copy(unsigned numCopies)

  -     static IString d2b(const IString& aString)

  -     IString& d2b()

  -     IString& d2c()

  -     static IString d2c(const IString& aString)

  -     static IString d2x(const IString& aString)

  -     IString& d2x()

  -     static void disableInternationalization()

  -     static void enableInternationalization(bool enable = true)

  -     bool includes(const char* pString) const

  -     bool includes(const IString& aString) const

  -     bool includes(char aChar) const

  -     bool includes(const IStringTest& aTest) const

  -     bool includesDBCS() const

  -     bool includesMBCS() const

  -     bool includesSBCS() const

  -     unsigned
          indexOf( const IStringTest& aTest,
                   unsigned startPos = 1 ) const

  -     unsigned
          indexOf( const char* pString,
                   unsigned startPos = 1 ) const

  -     unsigned
          indexOf( char aCharacter,
                   unsigned startPos = 1 ) const

  -     unsigned
          indexOf( const IString& aString,
                   unsigned startPos = 1 ) const

  -     unsigned
          indexOfAnyBut( const char* pValidChars,
                         unsigned startPos = 1 ) const

  -     unsigned
          indexOfAnyBut( const IString& validChars,
                         unsigned startPos = 1 ) const

  -     unsigned
          indexOfAnyBut( char validChar,
                         unsigned startPos = 1 ) const

  -     unsigned
          indexOfAnyBut( const IStringTest& aTest,
                         unsigned startPos = 1 ) const

  -     unsigned
          indexOfAnyOf( const IString& searchChars,
                        unsigned startPos = 1 ) const

  -     unsigned
          indexOfAnyOf( const char* pSearchChars,
                        unsigned startPos = 1 ) const

  -     unsigned
          indexOfAnyOf( const IStringTest& aTest,
                        unsigned startPos = 1 ) const

  -     unsigned
          indexOfAnyOf( char searchChar,
                        unsigned startPos = 1 ) const

  -     IString&
          insert( const char* pString,
                  unsigned index = 0,
                  char padCharacter = ' ' )

  -     static IString
          insert( const IString& aString,
                  const char* pInsert,
                  unsigned index = 0,
                  char padCharacter = ' ' )

  -     IString&
          insert( const IString& aString,
                  unsigned index = 0,
                  char padCharacter = ' ' )

  -     static IString
          insert( const IString& aString,
                  const IString& anInsert,
                  unsigned index = 0,
                  char padCharacter = ' ' )

  -     bool
          isAbbreviationFor( const char* pFullString,
                             unsigned minAbbrevLength = 0 ) const

  -     bool
          isAbbreviationFor( const IString& fullString,
                             unsigned minAbbrevLength = 0 ) const

  -     bool isAlphabetic() const

  -     bool isAlphanumeric() const

  -     bool isASCII() const

  -     bool isBinaryDigits() const

  -     bool isControl() const

  -     bool isDBCS() const

  -     bool isDigits() const

  -     bool isGraphics() const

  -     bool isHexDigits() const

  -     static bool isInternationalized()

  -     bool
          isLike( const IString& aPattern,
                  char zeroOrMore = ' * ',
                  char anyChar = '?' ) const

  -     bool
          isLike( const char* pPattern,
                  char zeroOrMore = ' * ',
                  char anyChar = '?' ) const

  -     bool isLowerCase() const

  -     bool isMBCS() const

  -     bool isPrintable() const

  -     bool isPunctuation() const

  -     bool isSBCS() const

  -     IString(long aLong)

  -     IString(short aShort)

  -     IString(const IString& aString)

  -     IString(unsigned short anUnsignedShort)

  -     IString(unsigned long long anUnsignedLongLong)

  -     IString(int anInt)

  -     IString(const signed char* pSignedChar)

  -     IString(const unsigned char* pUnsignedChar)

  -     IString(char aChar)

  -     IString(const char* pChar)

  -     IString( const void* pBuffer1,
                 unsigned lenBuffer1,
                 char padCharacter = ' ' )

  -     IString(const IText& anIText)

  -     IString(const IString* pIString)

  -     IString(signed char aSignedChar)

  -     IString(unsigned anUnsigned)

  -     IString(unsigned char anUnsignedChar)

  -     IString(unsigned long anUnsignedLong)

  -     IString(double aDouble)

  -     IString( const void* pBuffer1,
                 unsigned lenBuffer1,
                 const void* pBuffer2,
                 unsigned lenBuffer2,
                 const void* pBuffer3,
                 unsigned lenBuffer3,
                 char padCharacter = ' ' )

  -     IString( const void* pBuffer1,
                 unsigned lenBuffer1,
                 const void* pBuffer2,
                 unsigned lenBuffer2,
                 char padCharacter = ' ' )

  -     IString()

  -     IString(long long aLongLong)

  -     bool isUpperCase() const

  -     bool isValidDBCS() const

  -     bool isValidMBCS() const

  -     bool isWhiteSpace() const

  -     unsigned
          lastIndexOf( const IString& aString,
                       unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOf( char aCharacter,
                       unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOf( const IStringTest& aTest,
                       unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOf( const char* pString,
                       unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOfAnyBut( const IString& validChars,
                             unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOfAnyBut( char validChar,
                             unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOfAnyBut( const IStringTest& aTest,
                             unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOfAnyBut( const char* pValidChars,
                             unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOfAnyOf( char searchChar,
                            unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOfAnyOf( const IStringTest& aTest,
                            unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOfAnyOf( const char* pSearchChars,
                            unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     unsigned
          lastIndexOfAnyOf( const IString& searchChars,
                            unsigned startPos = ( unsigned ) UINT_MAX ) const

  -     static IString
          leftJustify( const IString& aString,
                       unsigned length,
                       char padCharacter = ' ' )

  -     IString&
          leftJustify( unsigned length,
                       char padCharacter = ' ' )

  -     unsigned length() const

  -     unsigned lengthOfWord(unsigned wordNumber) const

  -     static IString
          lineFrom( istream& aStream,
                    char delim = '\n' )

  -     static IString lowerCase(const IString& aString)

  -     IString& lowerCase()

  -     unsigned numWords() const

  -     unsigned
          occurrencesOf( char aCharacter,
                         unsigned startPos = 1 ) const

  -     unsigned
          occurrencesOf( const IStringTest& aTest,
                         unsigned startPos = 1 ) const

  -     unsigned
          occurrencesOf( const char* pString,
                         unsigned startPos = 1 ) const

  -     unsigned
          occurrencesOf( const IString& aString,
                         unsigned startPos = 1 ) const

  -     IString operator &(const char* pString) const

  -     IString operator &(const IString& aString) const

  -     IString& operator &=(const char* pString)

  -     IString& operator &=(const IString& aString)

  -     IString operator +(const char* pString) const

  -     IString operator +(const IString& aString) const

  -     IString& operator +=(const char* pString)

  -     IString& operator +=(const IString& aString)

  -     void operator <<=(IDataStream& fromWhere)

  -     IString& operator =(const IString& aString)

  -     void operator >>=(IDataStream& toWhere)

  -     IString operator ^(const IString& aString) const

  -     IString operator ^(const char* pString) const

  -     IString& operator ^=(const IString& aString)

  -     IString& operator ^=(const char* pString)

  -     IString operator |(const IString& aString) const

  -     IString operator |(const char* pString) const

  -     IString& operator |=(const IString& aString)

  -     IString& operator |=(const char* pString)

  -     IString operator ~() const

  -     operator char *() const

  -     operator signed char *() const

  -     operator unsigned char *() const

  -     IString&
          overlayWith( const IString& aString,
                       unsigned index = 1,
                       char padCharacter = ' ' )

  -     static IString
          overlayWith( const IString& aString,
                       const IString& anOverlay,
                       unsigned index = 1,
                       char padCharacter = ' ' )

  -     IString&
          overlayWith( const char* pString,
                       unsigned index = 1,
                       char padCharacter = ' ' )

  -     static IString
          overlayWith( const IString& aString,
                       const char* pOverlay,
                       unsigned index = 1,
                       char padCharacter = ' ' )

  -     IString& remove(unsigned startPos, unsigned numChars)

  -     static IString
          remove( const IString& aString,
                  unsigned startPos,
                  unsigned numChars )

  -     static IString
          remove( const IString& aString,
                  unsigned startPos )

  -     IString& remove(unsigned startPos)

  -     IString& removeWords(unsigned firstWord)

  -     static IString
          removeWords( const IString& aString,
                       unsigned startWord )

  -     static IString
          removeWords( const IString& aString,
                       unsigned startWord,
                       unsigned numWords )

  -     IString& removeWords(unsigned firstWord, unsigned numWords)

  -     IString& reverse()

  -     static IString reverse(const IString& aString)

  -     static IString
          rightJustify( const IString& aString,
                        unsigned length,
                        char padCharacter = ' ' )

  -     IString&
          rightJustify( unsigned length,
                        char padCharacter = ' ' )

  -     unsigned size() const

  -     static IString
          space( const IString& aString,
                 unsigned numSpaces = 1,
                 char spaceChar = ' ' )

  -     IString&
          space( unsigned numSpaces = 1,
                 char spaceChar = ' ' )

  -     static IString strip(const IString& aString, char aChar)

  -     static IString
          strip( const IString& aString,
                 const IStringTest& aTest )

  -     static IString
          strip( const IString& aString,
                 const char* pStringOfChars )

  -     IString& strip(char aCharacter)

  -     IString& strip(const IString& aString)

  -     static IString
          strip( const IString& aString,
                 const IString& aStringOfChars )

  -     IString& strip(const char* pString)

  -     IString& strip(const IStringTest& aTest)

  -     IString& strip()

  -     static IString stripBlanks(const IString& aString)

  -     IString& stripLeading()

  -     static IString
          stripLeading( const IString& aString,
                        const IString& aStringOfChars )

  -     IString& stripLeading(const IStringTest& aTest)

  -     IString& stripLeading(const IString& aString)

  -     static IString
          stripLeading( const IString& aString,
                        char aChar )

  -     static IString
          stripLeading( const IString& aString,
                        const char* pStringOfChars )

  -     static IString
          stripLeading( const IString& aString,
                        const IStringTest& aTest )

  -     IString& stripLeading(char aCharacter)

  -     IString& stripLeading(const char* pString)

  -     static IString stripLeadingBlanks(const IString& aString)

  -     IString& stripTrailing(const IString& aString)

  -     static IString
          stripTrailing( const IString& aString,
                         char aChar )

  -     IString& stripTrailing()

  -     IString& stripTrailing(char aCharacter)

  -     IString& stripTrailing(const IStringTest& aTest)

  -     static IString
          stripTrailing( const IString& aString,
                         const IString& aStringOfChars )

  -     static IString
          stripTrailing( const IString& aString,
                         const IStringTest& aTest )

  -     static IString
          stripTrailing( const IString& aString,
                         const char* pStringOfChars )

  -     IString& stripTrailing(const char* pString)

  -     static IString stripTrailingBlanks(const IString& aString)

  -     IString subString(unsigned startPos) const

  -     IString
          subString( unsigned startPos,
                     unsigned length,
                     char padCharacter = ' ' ) const

  -     IString&
          translate( const char* pInputChars,
                     const char* pOutputChars,
                     char padCharacter = ' ' )

  -     IString&
          translate( const IString& inputChars,
                     const char* pOutputChars,
                     char padCharacter = ' ' )

  -     IString&
          translate( const IString& inputChars,
                     const IString& outputChars,
                     char padCharacter = ' ' )

  -     static IString
          translate( const IString& aString,
                     const IString& inputChars,
                     const char* pOutputChars,
                     char padCharacter = ' ' )

  -     static IString
          translate( const IString& aString,
                     const char* pInputChars,
                     const char* pOutputChars,
                     char padCharacter = ' ' )

  -     static IString
          translate( const IString& aString,
                     const IString& inputChars,
                     const IString& outputChars,
                     char padCharacter = ' ' )

  -     static IString
          translate( const IString& aString,
                     const char* pInputChars,
                     const IString& outputChars,
                     char padCharacter = ' ' )

  -     IString&
          translate( const char* pInputChars,
                     const IString& outputChars,
                     char padCharacter = ' ' )

  -     IString& upperCase()

  -     static IString upperCase(const IString& aString)

  -     IString word(unsigned wordNumber) const

  -     unsigned
          wordIndexOfPhrase( const IString& aPhrase,
                             unsigned startWord = 1 ) const

  -     IString words(unsigned firstWord, unsigned numWords) const

  -     IString words(unsigned firstWord) const

  -     IString& x2b()

  -     static IString x2b(const IString& aString)

  -     static IString x2c(const IString& aString)

  -     IString& x2c()

  -     static IString x2d(const IString& aString)

  -     IString& x2d()

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IString

  -     IString&
          applyBitOp( const char* pArg,
                      unsigned argLen,
                      BitOperator op )

  -     IBuffer* buffer() const

  -     IString&
          change( const char* pPattern,
                  unsigned patternLen,
                  const char* pReplacement,
                  unsigned replacementLen,
                  unsigned startPos,
                  unsigned numChanges )

  -     char* data() const

  -     static char* defaultBuffer()

  -     unsigned
          findPhrase( const IString& aPhrase,
                      unsigned startWord,
                      IndexType charOrWord ) const

  -     unsigned
          indexOfWord( unsigned wordNumber,
                       unsigned startPos,
                       unsigned numWords ) const

  -     IString& initBuffer(long aLong)

  -     IString&
          initBuffer( const void* p1,
                      unsigned len1,
                      const void* p2 = 0,
                      unsigned len2 = 0,
                      const void* p3 = 0,
                      unsigned len3 = 0,
                      char padChar = 0 )

  -     IString& initBuffer(unsigned long anUnsignedLong)

  -     IString& initBuffer(unsigned long long anUnsignedLongLong)

  -     IString& initBuffer(double aDouble)

  -     IString& initBuffer(long long aLongLong)

  -     IString&
          insert( const char* pInsert,
                  unsigned insertLen,
                  unsigned startPos,
                  char padCharacter )

  -     bool
          isAbbrevFor( const char* pFullString,
                       unsigned fullLen,
                       unsigned minLen ) const

  -     bool
          isLike( const char* pPattern,
                  unsigned patternLen,
                  char zeroOrMore,
                  char anyChar ) const

  -     static unsigned lengthOf(const char* pChar)

  -     static const char* nullBuf()

  -     unsigned
          occurrencesOf( const char* pSearchString,
                         unsigned searchLen,
                         unsigned startPos ) const

  -     IString&
          overlayWith( const char* pOverlay,
                       unsigned overlayLen,
                       unsigned index,
                       char padCharacter )

  -     void readFromStream(IDataStream& fromWhere)

  -     IString& setBuffer(IBuffer* ibuff)

  -     IString&
          strip( const char* pChar,
                 unsigned len,
                 IStringEnum::StripMode mode )

  -     IString&
          strip( const IStringTest& aTest,
                 IStringEnum::StripMode mode )

  -     IString&
          translate( const char* pInputChars,
                     unsigned inputLen,
                     const char* pOutputChars,
                     unsigned outputLen,
                     char padCharacter )

  -     void writeToStream(IDataStream& toWhere) const

#### Inherited Protected Data

  IString

  -     static const char * const maxLong

  -     static const char * const null

  -     static const char * const zero