SA-MP Mobile

SA-MP Scripting and Plugins => Scripting Help => Help Archive => Topic started by: SA:MP on May 05, 2023, 08:51 AM

Title: Inserting a character into a string.
Post by: SA:MP on May 05, 2023, 08:51 AM
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. (https://sampforum.blast.hk/showthread.php?tid=278882)