string: always null terminate strings in snprintf().
whitespace.
string: add function docs.