Second, Third, ... Occurences Of String

Hi people,

I know that:

$strchr(x,y) Finds the first occurrence of character y in string x.
$strrchr(x,y) Finds the last occurrence of character y in string x.
$strstr(x,y) Finds the first occurrence of string y in string x.

But is there anyway to return the second, third, and so on of THE OCCURRENCES OF STRINGS in a text??? I had been thinking of trimming all text before the first occurrence, and search the next one to find the second, and to trim the text until this, and search again to find the third, and so on...

But is there a way to do this directly???


Beside the vehicle of the $meta functions ... Mp3tag has no itemlist related functions.

Read there ... about n-th occurence of substring in string ...

Other Example ...

Position 1.

$cutLeft(%TF%,$strstr(%TF%,' - ')) $strstr(%TF%,$cutLeft(%TF%,$strstr(%TF%,' - ')))

Position 2.

$cutLeft($cutLeft(%TF%,$strstr(%TF%,' - ')),$strstr($cutLeft(%TF%,$strstr(%TF%,' - ')),' - ')) $strstr(%TF%,$cutLeft($cutLeft(%TF%,$strstr(%TF%,' - ')),$strstr($cutLeft(%TF%,$strstr(%TF%,' - ')),' - ')))

Position 3.

$cutLeft($cutLeft($cutLeft(%TF%,$strstr(%TF%,' - ')),$strstr(%TF%,' - ')),$strstr($cutLeft($cutLeft(%TF%,$strstr(%TF%,' - ')),$strstr(%TF%,' - ')),' - ')) $strstr(%TF%,$cutLeft($cutLeft($cutLeft(%TF%,$strstr(%TF%,' - ')),$strstr(%TF%,' - ')),$strstr($cutLeft($cutLeft(%TF%,$strstr(%TF%,' - ')),$strstr(%TF%,' - ')),' - ')))


Thanks DetlevD, as you mentioned in the topic above, the actions are the main strength of mp3Tag, even when there is no direct function to do something, you can find alternatives...

Yes, that's it, it works fine...