canEncode static method

bool canEncode(
  1. String value
)

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

Basic strings can represent all strings that do only contain scalar Unicode values. While a basic string can contain surrogate pairs, there must be no unpaired high or low surrogate characters.

Implementation

static bool canEncode(String value) =>
    value.runes.every(TomlEscapedChar.isScalarUnicodeValue);