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

Solved No entries inside an array


Post New Thread Reply   
 
Thread Tools Display Modes
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 09-13-2018 , 15:27   Re: No entries inside an array
Reply With Quote #21

Quote:
Originally Posted by Ghosted View Post
yes, only first and last characters (Code if you understand C++)
It would be nicer if they made it to search the entire string instead of just the first and last characters, the native name is pretty mis-informing, at first I thought it removed every single quotation mark from the string.

Thanks everyone.
__________________
edon1337 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 09-13-2018 , 15:31   Re: No entries inside an array
Reply With Quote #22

Read the doc, it states that it does no trimming and only removes quotes at the beginning and end.
__________________
klippy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 09-13-2018 , 15:32   Re: No entries inside an array
Reply With Quote #23

Quote:
Originally Posted by KliPPy View Post
Read the doc, it states that it does no trimming and only removes quotes at the beginning and end.
Still, it would be more helpful if it removed all the quotation marks.
__________________
edon1337 is offline
Old 09-13-2018, 15:38
Ghosted
This message has been deleted by Ghosted. Reason: sec
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 09-13-2018 , 15:40   Re: No entries inside an array
Reply With Quote #24

Code:
stock remove_quotes_ex(Str[], Len)
{
new Temp = 0;

for (new Index=0; Index < Len; Index++)
{
if (Str[Index] != '"')
Str[Temp++] = Str[Index];
}

Str[min(Len - 1, Temp)] = 0;
}
Tested n works
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 09-13-2018 at 15:43.
Ghosted is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 09-13-2018 , 15:49   Re: No entries inside an array
Reply With Quote #25

Quote:
Originally Posted by edon1337 View Post
Still, it would be more helpful if it removed all the quotation marks.
Just use replace_all(), that's what it was made for, remove_quotes wouldn't exist if it did the exact same thing. remove_quotes() is great for handling command arguments or for parsing text in general, which is not that rare.
__________________

Last edited by klippy; 09-13-2018 at 15:50.
klippy is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viña del Mar, Chile
Old 09-13-2018 , 20:19   Re: No entries inside an array
Reply With Quote #26

Quote:
Originally Posted by edon1337 View Post
Still, it would be more helpful if it removed all the quotation marks.
Quote:
Originally Posted by KliPPy View Post
Read the doc, it states that it does no trimming and only removes quotes at the beginning and end.
In fact, read the doc, not the native name
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Reply


Thread Tools
Display Modes

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 12:23.


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