LoadCodepoints method

List<int> LoadCodepoints(
  1. String text
)

Implementation

List<int> LoadCodepoints(
  String text,
) => run(
  () => 'LoadCodepoints($text)',
  () {
    final count = rl.Temp.Int$.Ref1();
    final result = rl.Core.LoadCodepoints(
      rl.Temp.String$.ValueOrNull(text),
      count,
    );
    try {
      return List.generate(count.value, (i) => result[i]);
    } finally {
      rl.Core.UnloadCodepoints(result);
    }
  },
);