DelphiFAQ Home Search:

Format an IP number to have leading 0 (zeroes) using Delphi Pascal

 

commentsThis article has not been rated yet. After reading, feel free to leave comments and rate it.

Use the function shown below to format an IP number to have leading 0 (zeroes) using Delphi Pascal.

The output will look like this:

LeadingZeroIPNumber ('1.2.3.4') ==> 001.002.003.004
LeadingZeroIPNumber ('1.212.3.124') ==> 001.212.003.124

function LeadingZeroIPNumber (sIP : string) : string;
var
  i : integer;
  cnt : integer;
begin
  Result := '';
  cnt := 1;
  for i := length(sIP) downto 1 do
  begin
    if sIP[i] = '.' then
    begin
      Result := copy('000', cnt, 3) + Result;
      cnt := 0;
    end;
    Result := sIP[i] + Result;
    cnt := cnt + 1;
  end;
  Result := copy('000', cnt, 3) + Result;
end;

Content-type: text/html

Comments:

2009-02-17, 06:51:16
cheap,phones from China  
Retail mobile phones at wholesale prices: well, you have come to the foremost stage of China cell phones and cell phone watches: all cellular phones from onThesource.com are thoroughly UNLOCKED, that indicates they can be applicable with any pre-paid SIM cards if the GSM network frequencies are matching.
To cater to the most consumers from different regions, we listed many kinds of China cellphones varying from quad band (GSM850/900/1800/1900MHz), tri-band (GSM850/1800/1900MHz or GSM900/1800/1900MHz) to dual band (GSM900/1800MHz). Besides, those mobile phones can be categorized into TV Mobile Phones, Windows Smart Phones, Dual SIM Phones, and Cell Phone Watch etc.

Primary features which you will discover on onThesource.com China mobile phones:
Multi-languages (English, French, Spanish, Italian, Portuguese, German, Arabic, Russian, Thai, and Vietnamese) installed with;
MP3/MP4 player;
Touch Screen or Induce Screen;
Analog TV, FM Radio, Bluetooth;
1.30MP (Mega Pixels) Digital Camera built-in;
Two SIM card slots or three (Dual SIM Dual Standby and Dual SIM Single Standby);
2GB maximum memory extension;
Additional functions: Calendar, Calculator, Memo Reminder and other functions as general as other cell phones.
All cell phones on onThesource.com are manufactured in the nearby high-tech factories in South Mainland China, which means every cell phone bought from onThesource.com at wholesale break prices can enjoy one year factory after-sales services. No matter you are a retailer, a wholesaler, an eBay drop shipping broker or a terminal consumer, welcome to retail or wholesale China cell phones from onThesource.com

http://www.onthesou..le-phones/


Keywords:
2015-02-21, 00:43:22
anonymous from Indonesia  
Saya haturkan banyak terima kasih, karnah aki COKENG membantu memberikan solusi,,,kini saya udah lepas dari kendala yg saya alami kemaren, dan angka yg aki berikan sangat tepat, hanya sekali ini saya main togel...Buat kamu yg pengen menang togel....bisa hub: Ki Cokeng di: +6285394330318. terima kasih.
2015-02-21, 00:44:15
anonymous from Indonesia  
Saya haturkan banyak terima kasih, karnah aki COKENG membantu memberikan solusi,,,kini saya udah lepas dari kendala yg saya alami kemaren, dan angka yg aki berikan sangat tepat, hanya sekali ini saya main togel...Buat kamu yg pengen menang togel....bisa hub: Ki Cokeng di: +6285394330318. terima kasih.
2015-02-21, 00:45:12
anonymous from Indonesia  
Saya haturkan banyak terima kasih, karnah aki COKENG membantu memberikan solusi,,,kini saya udah lepas dari kendala yg saya alami kemaren, dan angka yg aki berikan sangat tepat, hanya sekali ini saya main togel...Buat kamu yg pengen menang togel....bisa hub: Ki Cokeng di: +6285394330318. terima kasih.
2015-02-25, 19:27:48
anonymous from Indonesia  
Saya haturkan banyak terima kasih, karnah KI COKENG membantu memberikan solusi,,,kini saya udah lepas dari kendala yg saya alami kemaren, dan angka yg aki berikan sangat tepat, hanya sekali ini saya main togel...Buat kamu yg pengen menang togel....bisa hub: Ki Cokeng di: +6285394330318. terima kasih.
2015-02-25, 19:32:43
anonymous from Indonesia  
Saya haturkan banyak terima kasih, karnah KI COKENG membantu memberikan solusi,,,kini saya udah lepas dari kendala yg saya alami kemaren, dan angka yg aki berikan sangat tepat, hanya sekali ini saya main togel...Buat kamu yg pengen menang togel....bisa hub: Ki Cokeng di: +6285394330318. terima kasih.

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: