encode method

List<int> encode(
  1. String s
)

Implementation

List<int> encode(String s) => s.split('').map((c) => stoi[c] ?? 0).toList();