Hello Mansour
The API for the ReplaceNextOccurrence() method looks interesting
You provided two versions of the parameters
The first version get String, Number & String ( i.e. "love", 5 , etc.)
The second version get List,List,List (i.e. :of = "love", :startingAt = 5, etc. )
Looks like a nice way to apply named parameters without the need to use [ ] inside the ( ) of the function call
but this suffer from two things
(1) You can't change the parameters order
(2) You can't add more parameters in the future without breaking the current code
So use this way only if you are sure that you will not change the parameters order and you will not need to add more parameters in the future (But are you sure that you know the future? IMHO, sometimes we can predict it correctly and sometimes we fail to do that)
In my projects I prefer accepting a List and write it like this myfunction( [ :para1 = value1, :para2 = value2 ])
Yes there are extra [ ] and I can't use the function without passing a List (i.e. can't write the values directly)
But this way is more flexible and support
(1) Changing the parameters order
(2) We can add more parameters in the future without breaking the current code
Note: I like your way, I fell it teaches me something new about Ring, I just shared my ideas about this topic
Keep up the GREAT WORK :D
Greetings,
Mahmoud