Don't rely on null character delimiting

It's slower to get the length of the string, and it's also less safe.
Merge pull request #2 from crumblingstatue/master

Don't rely on null character delimiting