Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove preceeding zeros
Message
 
À
02/02/2006 12:35:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01092962
Message ID:
01092965
Vues:
13
I see one possibility being a loop:
FOR loopcount = 1 to len(mystr)
 if left(mystr,1) = '0'
     mystr=right(mystr, len(mystr) - 1)
 else
     exit
 endif
next
There is probably an easier one though.

Richard

>Hi,
>
>I have a character string as below:
>
>SE7130000000001201212345
>
>I then do the following
>
>? SUBSTR("SE7130000000001201212345",6,19)
>
>which gives me
>
>0000000001201212345
>
>How can I remove the preceeding zeros with out deleting the zeros after the first number? Bear in mind the first number is not always in the same position.
>
>What I want is:
>
>1201212345
>
>Thanks,
>
>Ger
State of Florida, DCF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform