Fill the actual value of last occurrence of a character ( indices of table are ascii and values are index of occurence )
for ( i = 0 ; i < size ; i ++ ) badchar [ str [ i ] . charCodeAt ( 0 ) ] = i ; }