Code:char buf[90];
memset(buf, 0, 90);
Printable View
Code:char buf[90];
memset(buf, 0, 90);
Remember that if you want to just make a string empty, you don't have to zero out all the characters, but only the first.
This will make the string pretend it's empty - even strlen will return zero. :rolleyes:
(The string won't really be empty, but most string functions usually think that the string ends at the first zero character)
PHP Code:buf[0] = 0;