canEncode static method

bool canEncode(
  1. String str
)

Tests whether the given string can be represented as a literal string.

The string must only contain characters matched by charParser.

Implementation

static bool canEncode(String str) => charParser.star().end().accept(str);