i have a string which is extracted from a text file. from that particular string, i have assigned each of the letters in that string a particular value.
how do i know the position of each characters in a string?
because from that string, i have to search for 4 consecutive characters which has an assigned value of more than 1.0.
after calculating the average of the 4 characters, i have to shift to the next character, one at a time and calculate its average.
i cant figure out how to shift to the next character in the string.
for eg....
string: "aaaabbbccc"
after extracting four characters, "abbb",
how do i shift to take the next character, "c" or go backwards to take the previous character, "a"?
how do i know the position of each characters in a string?
because from that string, i have to search for 4 consecutive characters which has an assigned value of more than 1.0.
after calculating the average of the 4 characters, i have to shift to the next character, one at a time and calculate its average.
i cant figure out how to shift to the next character in the string.
for eg....
string: "aaaabbbccc"
after extracting four characters, "abbb",
how do i shift to take the next character, "c" or go backwards to take the previous character, "a"?
Comment