Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 7th, 2004, 03:56 PM
lucasnishimura lucasnishimura is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 32 lucasnishimura User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 24 m 13 sec
Reputation Power: 5
Removing left Zeros

hi Folks
my app returns some strings...
Strings like

0000000000002390,74
0000000000000005,32
0000000000001000,00
Is there any function to remove the zeros on the left ?
Thanx

Reply With Quote
  #2  
Old November 9th, 2004, 03:54 AM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 5
Send a message via Yahoo to SilverDB
Lightbulb

You can create your own or you could use "function Copy(S; Index, Count: Integer): string;" to copy only a part of that string.
All you have to do is get the index of the first character that is not "0" and then use the Copy function.
To get that index you can use the Pos function ("Returns the index value of the first character in a specified substring that occurs in a given string.")

Reply With Quote
  #3  
Old November 11th, 2004, 06:44 AM
lucasnishimura lucasnishimura is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 32 lucasnishimura User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 24 m 13 sec
Reputation Power: 5
Thanx for help buddy, after all i figured out that posting 0012 to an access database will automatically convert it to 12(If Integer).
So there was no need to write such function...
Any way thanx for your atention...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > Removing left Zeros


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT