substring method Null safety
Returns the substring of string between start and end.
Unlike String.substring, end defaults to position rather than the
end of the string.
Implementation
String substring(int start, [int? end]) {
end ??= position;
return string.substring(start, end);
}