Removing spaces at the end of a string
#1

Hello, I want to make this:
Quote:

"Hello! " ===> "Hello!"

I tried to do it by myself so this is the result and it doesn't work:
Quote:

new pos = strlen(thestring);
while(thestring[pos] == ' '){pos--;}
strdel(thestring, pos, strlen(text));

Reply


Messages In This Thread
Removing spaces at the end of a string - by Neos07 - 24.06.2015, 02:34
Re : Removing spaces at the end of a string - by KillerDVX - 24.06.2015, 02:37
Re: Removing spaces at the end of a string - by Neos07 - 24.06.2015, 02:40
Re : Removing spaces at the end of a string - by KillerDVX - 24.06.2015, 02:42
Re: Removing spaces at the end of a string - by Neos07 - 24.06.2015, 02:51
Re : Removing spaces at the end of a string - by KillerDVX - 24.06.2015, 03:27

Forum Jump:


Users browsing this thread: 1 Guest(s)