parseString function

String parseString(
  1. String value
)

Parses a string from the given value and returns it as a String.

Implementation

String parseString(final String value) {
  if (value.isEmpty) {
    throw const FormatException('Value cannot be empty');
  }
  return value.trim();
}