Using split() here creates an array and a bunch of single-character strings.  Please just use a regular for loop over the string.