Refactor on function containsDot

It's just the native function by the way...

If the return is -1 the string doesn't have the dot char.