isBlankStringInRange function
Returns true
if s
has only blank characters in range offset
+length
.
Implementation
bool isBlankStringInRange(String s, int offset, int length) {
if (length <= 0) return false;
var end = Math.min(s.length, offset + length);
for (var i = offset; i < end; i++) {
var c = s.codeUnitAt(i);
if (!isBlankCodeUnit(c)) return false;
}
return true;
}