add an array based bitmap to implement the function

One is using the toCharArray() in string and One is using the charAt[]
in string.