secondIndex method
Finds the index of the second occurrence of char.
Implementation
int secondIndex(String char) {
if (char.isEmpty || isEmpty) return -1;
final int firstIdx = indexOf(char);
if (firstIdx == -1) return -1;
return indexOf(char, firstIdx + 1);
}