const qualify buffer size, add TODO
prefer length bounded string manipulation variants