When a string does not have a dotIndex[-1] the code would crash when sub...

When a string does not have a dotIndex[-1] the code would crash when sub...