![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#5
|
||||
|
||||
|
Otra forma:
Código:
function IsValidIP(S: String): Boolean;
var
Strings: TStringList;
begin
Result := false;
Strings := TStringList.Create;
Strings.Delimiter := '.';
Strings.DelimitedText := S;
if Strings.Count <> 4 then exit;
repeat
Result := (StrToIntDef(Strings[0], -1) in [0..255]);
Strings.Delete(0);
until (Strings.Count = 0) or not Result;
Strings.Free;
end;
Última edición por roman fecha: 30-09-2003 a las 17:07:46. |
|
|
|