Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locating a number within a character string
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00364345
Message ID:
00364516
Vues:
35
>>Doyle,
>>
>>>I'm looking for a function to locate the occurance of a number within a character string such as AT(). Thhanks to all.
>>
>>Please explain in more detail what you need. Do you mean you want to find "675" in a character string, or you want to find the first numeral in a character string, or look for all the 9's, or what?
>
>Try VAL(mystring)
>
>mystring = "ABCD2345DEFG"
>
>VAL(mystring) = 2345!

You're saying that this is the result he wants, right? The above will yield 0.00. However, with a little help from Foxtools:

mystring = "ABCD2345DEFG"
? VAL(Strfilter(mystring, "0123456789"))

produces 2345.00
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform