|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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.") |
|
#3
|
|||
|
|||
|
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... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > Removing left Zeros |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|