buf: Add 'len' param to set(); now strnset
cmd: Add strnset, to create command from a string

Had to modify the internal get_wc, since the strings aren't necessarily
null-terminated.