Returns the first occurrence of substring in a string and returns its position starting at startOffset.