本文介绍了有关std :: string的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 可以请一个人给我一个不错的网站,给出一个 所有成员函数的详尽列表, 成员变量,std的运算符等: :字符串类, 以及每个工作原理的信息描述。 我在过去的20分钟内一直在尝试谷歌但是可以'' t $ / $ 得到任何体面的东西。 谢谢。 -JKop 解决方案 http://www.cppreference.com/ Martin - - 你是匿名的吗?哪里? ......我不这么认为...... [devnull {at} chaosfactory {dot} org | http://www.chaosfactory.org/ ] 你可能会想要尝试Dinkumware的C ++库参考: http: //www.dinkumware.com/refxcpp.html Best Kai-Uwe Bux Can some-one please point me to a nice site that gives anexhaustive list of all the memberfunctions,membervariables, operators, etc. of the std::string class,along with an informative description of how each works.I''ve been trying Google for the last 20 minutes but can''tget anything decent.Thanks.-JKop 解决方案 http://www.cppreference.com/Martin--Are you Anonymous? Where? ... I don''t think so ...[ devnull{at}chaosfactory{dot}org | http://www.chaosfactory.org/ ]You might want to try the C++ Library Reference from Dinkumware: http://www.dinkumware.com/refxcpp.htmlBestKai-Uwe BuxJust to get one thing straight: When you do:string blah("Hello!!");Is new memory allocated and is "Hello!!" copied, yes?Anyway, I''m brand-new to std::string, so can some-one please comment on myfollowing code. At the moment it compiles but it causes run-time accessviolations:string& RemoveUnnecessarySpaces(string& input_string){// *** Remove spaces at startwhile (input_string[0] == '' '') input_string.erase(0,1);// *** DONE remove spaces at start// *** Remove spaces from endwhile (input_string[input_string.length() -1] == '' '')input_string.erase(input_string.length() -1,1);// *** DONE remove spaces from end// *** Remove multiples spacesfor (string::size_type i = 0; ; ){i = input_string.find_first_of('' '', i);if (i == string::npos) break;++i;while(input_string[i] == '' '') input_string.erase(i,1);++i;}// *** DONE remove multiple spaces}-JKop 这篇关于有关std :: string的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-06 22:32