Notes
In Apex, the indexof()
method is a string method returns the index of the first occurrence of the specified substring. If the substring does not occur, this method returns -1.
Here's an example:
String myString = 'abcde';
System.debug(myString.indexof('d'));
Output: 3
Video
Video does not exists.