Updates implementation of containsString to check the length property of the returned range instead of the location