If the current character appears after the previous character according to the given circular alphabetical order
if ( ( curr == ' ' && prev == ' ' ) || ( curr . charCodeAt ( 0 ) - prev . charCodeAt ( 0 ) == 1 ) ) i ++ ; else break ; } return i - 1 ; }