Thread: char_to_num() ?
View Single Post
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 10-07-2008 , 12:44   Re: char_to_num() ?
Reply With Quote #9

Alka, I have as much evidence to support my claim as I assume you do, but I believe Exolent's version is faster. Calling natives is not free. I also think this is a better approach.

Code:
stock charToInt(char) {     if(!('0' <= char <= '9'))         return -1     return char - 48; }
__________________
No support via PM.

Last edited by Lee; 10-07-2008 at 14:32.
Lee is offline