#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    32
    Rep Power
    11

    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. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Romania
    Posts
    173
    Rep Power
    11

    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.")
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    32
    Rep Power
    11
    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...

IMN logo majestic logo threadwatch logo seochat tools logo