refactor string lib, and add lots of functions