tokenize method

String tokenize(
  1. String instruction,
  2. Map<String, String> tokens
)
inherited

Implementation

String tokenize(String instruction, Map<String, String> tokens) {
  String output = instruction;
  tokens.forEach((key, value) {
    output = output.replaceAll('{$key}', value);
  });
  output = output.replaceAll(RegExp(r' {2}'), ' ');
  return output;
}