Internet Direct (Indy)
Home
PreviousUpNext
TIdStack.IsIP Method

Indicates if the string contains a valid IP address.

Pascal
function IsIP(
    AIP: string
): Boolean;
Parameters 
Description 
AIP 
Values to be checked for a valid IP address. 

Boolean - True when a valid IP address is present.

IsIP is a Boolean function used to indicate when the IP address in AIP contains a valid IP address expressed in numeric dotted-decimal form. 

IsIP will return True when the value in AIP contains four byte values (each byte in the range 0 to 255) separated by the '.' delimiter. 

For example: 

 

Value Result 
 

-------------- -------------------------------------------------

 

0.0.0.0 True 
255.255.255.255 True 
127.0.0.1 True 
256.0.0.0 False (The first byte is an invalid value). 
127.0.1 False (Not enough values to represent the 32-bit network address). 
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.