Raised This Month: $ Target: $400
 0% 

Empty string


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 12-03-2014 , 22:08   Empty string
Reply With Quote #1

Ciao guys,

yes, it's me again... I got a two, kind of lame questions...

1) What is the best way, how to determine if string is empty?
PHP Code:
// is empty option 1
if (StrEqual(sMyString""))

// is empty option 2
if (strlen(sMyString) == 0)

// is empty option 3
if (sMyString[0] == EOS
2) And how to make string empty properly?
PHP Code:
// make empty option 1
strcopy(sMyStringsizeof(sMyString), "");

// make empty option 2
sMyString[0] = EOS

Last edited by KissLick; 12-04-2014 at 09:44.
KissLick is offline
 



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 14:28.


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