company logo

String :: index - Get character at position

The function returns the character at the given position passed in iPosition within a string. The position denotes the character position (not the byte position). The character is returned as UTF32 code value regardless on the internal string encoding.

When the position passes the end of the string, the function returns 0. When the position is invalid (negative), the function throws an exception.

Return value:  Integer value ( int32  )

The value is passed as platform independent 32-bit integer value.

Implementation details

int32 String  :: index ( int32 iPosition )
  • iPosition - Position in collection

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