Record a little knowledge about IndexOf, we know IndexOf method is used to obtain a position of a character in a string.
str.IndexOf ( "character look"); returns the character for the first time to appear, but note that a small point. Returns IndexOf has a value starting from 0 (inclusive), not the value of -1 is returned when it is judged not to be equal to 0 is determined.