subStringIfExist method
substring(start, end) that returns the whole text when it is shorter than end. "hello".subStringIfExist(0, 3) → "hel"
Implementation
String subStringIfExist(int start, int end) => length > end ? substring(start, end) : this;