Modul:URLutil: Unterschied zwischen den Versionen
isIpv4: -- Currently supports only dotted decimal notation for IPv4. Does not support -- dotted hexadecimal, dotted octal, or single-number formats (see IPv4#Address_representations).
w>קיפודנחש (whitespace damage.) |
w>Dcoetzee (isIpv4: -- Currently supports only dotted decimal notation for IPv4. Does not support -- dotted hexadecimal, dotted octal, or single-number formats (see IPv4#Address_representations).) |
||
Zeile 26: | Zeile 26: | ||
end | end | ||
-- Currently supports only [[dotted decimal]] notation for IPv4. Does not support | |||
-- dotted hexadecimal, dotted octal, or single-number formats (see [[IPv4#Address_representations]]). | |||
function _isIpV4( s ) | function _isIpV4( s ) | ||
local function legal( n ) return ( tonumber( n ) or 256 ) < 256 end-- in lua 0 is true! | local function legal( n ) return ( tonumber( n ) or 256 ) < 256 end-- in lua 0 is true! |