好的C ++字符串操作库 [英] Good C++ string manipulation library
本文介绍了好的C ++字符串操作库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于flamed std :: string和std :: wstring,我很抱歉。他们是相当有限,远不是线程安全。性能明智,他们不是那么好。我想念简单的功能:
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:
- 将字符串拆分成数组/向量/列表
- 直观的不区分大小写的查找&
- 支持i18n而不用担心string或wstring
- 转换为int,float,double
- 从UTF-8,UTF-16&其他编码
- 线程安全/可重入
- 没有依赖性
- 高度便携,跨平台
- Splitting a string into array/vector/list
- Simple & intuitive case-insensitive find & replace
- Support for i18n without worrying about string or wstring
- Conversion to and from int, float, double
- Conversion to and from UTF-8, UTF-16 & other encodings
- Thread-safe/reentrant
- Small footprint & no dependencies
- Highly portable & cross-platform
我发现Qt QString很有用,同时也找到了CBString http://bstring.sourceforge.net/bstrFAQ.shtml
I've found Qt QString to be useful and also found CBString http://bstring.sourceforge.net/bstrFAQ.shtml
任何其他建议&比较?谢谢。
Any other suggestions & comparisons? Thank you.
推荐答案
Boost 的5F39%5F0 / doc / html / string%5Falgo.html> C ++字符串算法库具有几乎所有的功能你需要。
The C++ String Algorithms Library from Boost has pretty much all of the features you need.
这篇关于好的C ++字符串操作库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文