An idea which has at least a couple of shortcomings. You have to traverse the entire string to find the length, and if you (or your code) forgets the add the NULL to the end, you're screwed.