$replace but only part of the string - 09/02/16 08:26 PM
Okay, let's say I have this:
If I want to replace only the second comma to " and" or something, how would I do that?
If I do:
The result will be: I like bots and bananas and solutions.
But I want it to be: I like bots, bananas and solutions.
Of course, I could just split the string into two, but that's not what I'm looking for (I want it to be able to do it with every string I give him)
Thanks in advance.
Code:
var %x = I like bots, bananas, solutions.
If I want to replace only the second comma to " and" or something, how would I do that?
If I do:
Code:
$replace(%x,$chr(44), $chr(32) and)
The result will be: I like bots and bananas and solutions.
But I want it to be: I like bots, bananas and solutions.
Of course, I could just split the string into two, but that's not what I'm looking for (I want it to be able to do it with every string I give him)
Thanks in advance.