substring method
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]) {
if (end == null) end = position;
return string.substring(start, end);
}