09-12-2018, 03:04 PM
The most portable way would be a simple for loop and assign char #0 to each character. Unless you are in a high performance heavy load server environment in which this code plays a large part, you will see no difference between this and using a WinAPI call or assembly to do it.