codeUnitAt static method

int codeUnitAt(
  1. String value,
  2. int index
)

Returns the character from value at index or $nul if the index is out of range.

Implementation

static int codeUnitAt(final String value, final int index) {
  return (index < 0 || index >= value.length)
      ? $nul
      : value.codeUnitAt(index);
}