The key to using the method for validation is to compare the updated index to the length of the original input string.
使用该方法验证的关键在于将更新过的索引和初始输入字符串的长度进行比较。
If the index of the current letter is less than the length of the string, you invoke your named template again, passing the original string and incrementing the index by 1.
如果当前字母的下标小于字符串的长度,则再次调用已命名的模板,传递原始字符串并把下标加1。
In addition to comparing the length and index values for equality, you must also check for either a null Number after parsing or an empty input string (" "or length of zero).
除了要比较长度和索引值是否相等之外,还必须检查是解析后的null Number还是一个空的输入字符串(或长度为0)。
应用推荐