use StrBuf to support push_char method