Count occurrences of current vowel in typed .
$ count2 = 1 ; while ( $ j < $ m - 1 && $ typed [ $ j ] == $ str [ $ i ] ) { $ count2 ++ ; $ j ++ ; } if ( $ count1 > $ count2 ) return false ; } return true ; }