is it possible to remove the "#" symbol from a string?
#1

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?
Reply
#2

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. 
Reply
#3

pawn Код:
strval(inputtext[1])
if it is always this form
Reply
#4

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"
Reply
#5

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
strval(inputtext[1])
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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)