好的C ++字符串操作库 [英] Good C++ string manipulation library

查看:123
本文介绍了好的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:


  1. 将字符串拆分成数组/向量/列表

  2. 直观的不区分大小写的查找&

  3. 支持i18n而不用担心string或wstring

  4. 转换为int,float,double

  5. 从UTF-8,UTF-16&其他编码

  6. 线程安全/可重入

  7. 没有依赖性

  8. 高度便携,跨平台

  1. Splitting a string into array/vector/list
  2. Simple & intuitive case-insensitive find & replace
  3. Support for i18n without worrying about string or wstring
  4. Conversion to and from int, float, double
  5. Conversion to and from UTF-8, UTF-16 & other encodings
  6. Thread-safe/reentrant
  7. Small footprint & no dependencies
  8. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆