Why do you need to clear it in the first place? Isn't there an ending character or some first char indicating string lenght etc, don't know exactly how it works.