IndexOf(“Billing Contact”) is searching for the characters found between the parenthesis “Billing Contact” in the overall string. It searches from the beginning until it finds “Billing Contact”. Once it finds that word, it returns the exact position within the overall string where it was found (where the first character is 0 and each character is +1 after that, so the 100th character in the string would return the number 99).
LastIndexOf() is doing the exact same thing, except it searches for “Billing Contact” starting from the end of the string.
If the first index (aka IndexOf) and the last index (LastIndexOf) are exactly the same, that means it only found the word “Billing Contact” one time within the string.