Revert "[common.string] use std::stringstream instead of to_string"

This reverts commit cc621852ba0943c006f8289a1da0473fad3a93a0.
[common.string] add explicit code to handle char and adjust test