本文介绍了使用通配符处理字符串返回字符串列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
-SA —SA
我正在寻找的是处理字符串值,如:0 **并且需要一个输出字符串列表,其中包含与输入值匹配但仅与数字匹配的所有值。 例如: 输入:" 0 **" 输出:(字符串列表) " 001" " 002" 。 。 。 " 010" " 011" 。 。 。 " 098" " 099" 我不知道STL库是否已经有用于此目的的东西。 谢谢。 关心
解决方案当然STL会给出你想要的一切: www.cplusplus/reference/string/ string / [ ^ ], www.cplusplus/reference/vector/vector/ [ ^ ] :-)
Hi, what I am looking for is processing a string value like: "0**" and need for an output string list that contain all the values that matches the input value but only with digits. In example: Input: "0**" Output: (a string list) "001" "002" . . . "010" "011" . . . "098" "099" I don''t know if STL library has already something that can be useful for this purpose. Thanks. Regards
解决方案 Of course STL will give you all you want: www.cplusplus/reference/string/string/[^], www.cplusplus/reference/vector/vector/[^] :-)更多推荐
使用通配符处理字符串返回字符串列表
发布评论