is it possible to remove the "#" symbol from a string? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: is it possible to remove the "#" symbol from a string? (
/showthread.php?tid=661029)
is it possible to remove the "#" symbol from a string? -
rollercaster - 19.11.2018
is it possible to remove the "#" symbol from a string?
ex:
Inputtext on dialog (#1 Item A)
and to delete #: (1 Item A)
or can find the number 1 of inputtext?
Re: is it possible to remove the "#" symbol from a string? -
Eoussama - 19.11.2018
Of course, you can. You can either work it out with your own algorithm or use one of the community string manupilation libraries, there are a few.
You can also consider looking at this:
https://forum.sa-mp.com/showpost.php...95&postcount=5
Make use of that function like this:
PHP код:
new string[] = "Some text, # some other text.";
strreplace(string, "#", "");
// should result in this: Some text, some other text.
Re: is it possible to remove the "#" symbol from a string? -
Jefff - 19.11.2018
if it is always this form
Re: is it possible to remove the "#" symbol from a string? -
rollercaster - 19.11.2018
Quote:
Originally Posted by Eoussama
Of course, you can. You can either work it out with your own algorithm or use one of the community string manupilation libraries, there are a few.
You can also consider looking at this: https://forum.sa-mp.com/showpost.php...95&postcount=5
Make use of that function like this:
PHP код:
new string[] = "Some text, # some other text.";
strreplace(string, "#", "");
// should result in this: Some text, some other text.
|
Problem error 017: undefined symbol "strreplace"
Re: is it possible to remove the "#" symbol from a string? -
rollercaster - 19.11.2018
Quote:
Originally Posted by Jefff
if it is always this form
|
thanks a lot, that's what we're looking for
and how many attempts and improvisations I did and I did not succeed