splitAtString function
Split string into two.
Implementation
List<String> splitAtString(int n, String s) {
if (n <= 0) {
return ['', s];
}
if (n >= s.length) {
return [s, ''];
}
return [s.substring(0, n), s.substring(n, s.length)];
}