Query on Mapping Function
I am not clear about the functionality of the standard mapping functions
Indexof() and Lastindexof().
What is the functionality of 2 and 3 input parameters..
It would be help full if some one could explain with examples...
>>Indexof (2 input parameter)
Returns the positon where the second string is found in the first string.
Eg: santhosh & a = 1.
santhosh & s = 0.
>>Indexof(3 input parameter)
Returns the positon where the second string is found in the first string but the search starts from the specified position.
Eg: santhosh & s & 0 = 0 but
santhosh & s & 3 = 6 bcz after the 3rd pos s occurs at 6th pos.
>>Lastindex of(2 input parameter)
Eg: santhosh & s = 6.
>>Lastindexof(3 input parameter)
santhosh & s & 3 = 6
Lastindex is same as index except it searches for the last occurance
Hope this clears