text: Check if there is any other character other than '0' or '1' . If so then set oneSeen to 0 to search again for new pattern
code: if ( getChar != '0' && str . charAt ( i ) != '1' ) oneSeen = false ; } return count ; }