29.07.2015, 21:06
@RyDeR`:
Well, actually, i wrote a faster function for IpToInt, look at this you don't need loops with a little math:
Greekz
Well, actually, i wrote a faster function for IpToInt, look at this you don't need loops with a little math:
PHP код:
static stock IpToInt2(const ip[])
{
new b=(ip[2]=='.')?3:4,c=(ip[b+1]=='.')?(b+2):(b+3),d=(ip[c+1]=='.')?(c+2):(c+3);
static Byte[1 char];
return Byte{0} = strval(ip[0]),
Byte{1} = strval(ip[b]),
Byte{2} = strval(ip[c]),
Byte{3} = strval(ip[d]),
Byte;
}
![cool](images/smilies/cool.png)