Good C++ string manipulation library

后端 未结 7 863
梦谈多话
梦谈多话 2021-01-30 01:05

I\'m sorry for flaming std::string and std::wstring. They are quite limited and far from being thread safe. Performance wise, they are not that good too. I miss simple features

7条回答
  •  执笔经年
    2021-01-30 01:38

    I'm not sure I agree. Strings really shouldn't be thread-safe due to the overhead, except for reference-counting, if applicable. Most of the other functionality you want would turn strings into a garbage barge. Likewise, removing dependencies would remove their ability to work well with streams.

    The one thing I'd suggest is that we could benefit from an immutable string class, particularly one that has no memory ownership or termination. I've written those before and they can be very helpful.

提交回复
热议问题