Raised This Month: $51 Target: $400
 12% 

Replace last char from a string


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
killergirl
Senior Member
Join Date: Jul 2010
Old 03-24-2013 , 19:04   Replace last char from a string
Reply With Quote #1

I want to remove the last "," from my string, but I'm getting buffer to big error when I'm compiling.

PHP Code:
new test[128], iLen

iLen 
+= formatex(testiLen"START,")

for(new 
05i++){
    
iLen += formatex(test[iLen], 128 iLen"%d%d,"ii// note, there is a "," at the end of the str
}

replace(testsizeof(test)-2","""
killergirl is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 03-24-2013 , 20:41   Re: Replace last char from a string
Reply With Quote #2

Code:
test[len - 1] = EOS;
__________________
hleV is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-25-2013 , 01:49   Re: Replace last char from a string
Reply With Quote #3

Change place of coma

PHP Code:
new test[128], iLen

iLen 
+= formatex(testiLen"START")

for(new 
05i++){
    
iLen += formatex(test[iLen], 127 iLen",%d%d"ii)

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-25-2013 at 01:50.
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode