isHeaderValueValid static method

bool isHeaderValueValid(
  1. String value
)

Tests if the given value can be used as HTTP header's value

Implementation

static bool isHeaderValueValid(String value) {
  for (final byte in value.codeUnits)
    if (!_isHeaderValueValidCC(byte))
      return false;
  return true;
}