Use char to get an offset of a string