Home > ActionScript > How To – Clear content of an entire String or Array

How To – Clear content of an entire String or Array

December 20th, 2014

If you want to zero the entire contents of the string, you can do it this way:

memset(buffer,0,strlen(buffer));

but this will only work for zeroing up to the first NULL character.

If the string is a static array, you can use:

memset(buffer,0,sizeof(buffer));

Be Sociable, Share!
Categories: ActionScript Tags:

Comments Closed

Comments are closed.