company logo

String :: firstOf - Find first occurence of character in a string

The function looks for the first occurrence of one of the characters passed in the string cMask. The function returns the byte position of the character found.

Notes:

The function works properly for 8-bit characters passed in cMask, only, but not for any kind of UTF encoded strings.

Return value:  Position in collection ( int32  )

The position of an element in a collection is beginning with 0 for the first element.

Implementation overview

Implementation details

  1. Find first occurence of character in a string
    int32 String  :: firstOf ( odaba::String &cMask )

    The function starts searching at first position in the string.

    • cMask - - Title unknown
  2. to list
  3. Find first occurence of character in a string starting at position
    int32 String  :: firstOf ( int32 iPosition, odaba::String &cMask )

    The function starts searching at string position passed in iPosition.

    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

    • cMask - - Title unknown
  4. to list