startsWith method

bool startsWith(
  1. Object other, {
  2. bool caseSensitive = true,
})

Returns true if the string starts with other.

Implementation

bool startsWith(Object other, {bool caseSensitive = true}) {
  final v = caseSensitive ? value : value.toLowerCase();
  final t = caseSensitive ? _resolve(other) : _resolve(other).toLowerCase();
  return v.startsWith(t);
}