Nils Gösche brought next idea :
Hi!
Quick question:
Does the standard C function strspn have an equivalent in the .net
standard library?
Regards,
I think you need to dive into the Regex object
(System.Text.RegularExpressions).
this C code:
int i;
char strtext[] = "129th";
char cset[] = "1234567890";
i = strspn (strtext,cset);
would be something like:
// using System.Text.RegularExpressions;
int len = 0;
Regex reNum = new Regex("[0-9]+");
Match m = reNum.Match("129th");
if (m.Success)
len = m.Length;
Hans Kesting