stringIndex working for two-character strings