Notes
In Apex, the lastIndexOf()
method is used to return the index of the last occurrence of the specified substring. If the substring does not occur, this method returns -1.
Here's an example:
String txt ='mitsubishi';
Integer lastindex = txt.lastIndexOf('i');
System.debug('The last index of i is: ' + lastindex);
Output: The last index of i is 9
Video
Video does not exists.