Hello, in writing a scripting engine, I have functions like (psuedo-code)
function is_whitespace?(char c){
return c==' ' || c=='\t' || c=='\r' || c=='\n';
}
Well, my question is which is faster in most langugaes? That or using regex like
function is_whitespace?(char c){
return regex_match('\s',c);
}
The chief languages I'm concerned with are C#, C, and Ruby also in case it is completely platform-dependent.