Thread: Empty string
View Single Post
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