characterAt method Null safety

Characters characterAt(
  1. int position
)

Returns the single-character sequence of the positionth character.

The position must be non-negative and less than length.

This operation must iterate characters up to position to find the result, just like elementAt. It is not an efficient way to iterate over the individual characters of a Characters.

An call to chars.characterAt(n) is equivalent to chars.elementAt(n).characters, or to chars.getRange(n, n + 1) (except that getRange allows n to be larger than length).

Implementation

Characters characterAt(int position);