private static bool TrailingZeros(string s, int index) { // For compatibility, we need to allow trailing zeros at the end of a number string for (int i = index; i < s.Length; i++) { if (s[i] != '\0') { return false; } } return true; }