Inserting a character into a string.

Started by SA:MP, May 05, 2023, 08:51 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

SA:MP

Inserting a character into a string.

I've been trying a lot of methods and some fail and some work a little.. Hmm..



Suppose I have a string "trololo1o1o1olo1"



Now How can I replace all the "1"s here with "_1" so it looks like: "trololo_1o_1o_1olo_1"?



I used loops,strfind,strins.. they all failed cuz I'm messing up somewhere..



Any Help Please ?

Source: Inserting a character into a string.