返回不包含非数字字符的字符串的函数

问题描述:



我正在寻找一个获取字符串的函数,并返回不包含非数字字符的字符串.
例如:
将字符串"A1B2C3"赋予该函数时,返回值将为:"123".
我现在很容易自己编写它,但是在c ++中不是像这样的函数吗?

谢谢,

Nir.

Hi,

I am looking for a function which gets a string, and returns that string without the characters which are not numeric.
for example:
when the string "A1B2C3" is givven to the function the returned value will be: "123".
I now its very simple to write it on my own, but isn''t any function like that in c++ ?

Thanks,

Nir.

不,没有这样的功能,您必须编写自己的功能.
:)
No, there isn''t such a function, you''ve to write your own.
:)