Changed all string.substr(index,1) for one character in string[index] variant.
According to articles on the net this should be faster.

Signed-off-by: Michel <info@1st-setup.nl>