flatContains<V> method
- V value
Checks if the current string contains the given value
when both are flattened.
If the current string is blank, it returns true
only if the value
is also blank.
If the value
is blank, it returns true
.
Otherwise, it checks if the current string contains the value
when both are flattened.
Returns true
if the current string contains the value
, false
otherwise.
Implementation
bool flatContains<V>(V value) {
if (asFlat.isBlank) return value.asFlat.isBlank;
if (value.asFlat.isBlank) {
return true;
}
return asFlat.contains(value!.asFlat);
}