codeUnitAt static method

int codeUnitAt(
  1. String? string,
  2. int index
)

Refer to Safe.codeUnitAt

If string is null it is treated as an empty string which will result in an IndexOutOfBoundsException

Implementation

static int codeUnitAt(String? string, int index) =>
    Safe.codeUnitAt(string, index);