Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numeric string or not?
Message
De
22/03/2001 09:10:02
 
 
À
21/03/2001 19:26:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00487462
Message ID:
00487549
Vues:
7
Hi David.

>> Is there a quick way to determine if a character string represents a legal numeric string (contains only digits and maybe a sign or .)? <<

In addition to what the others have told you, you can use the FoxTools StrFilter function to do this like so:
SET LIBRARY TO HOME()+"FoxTools"
LOCAL lcString, lcResultString

lcResultString = StrFilter( lcString, "01234567+-." )
IF lcResultString == lcString
   *** The original string contains only legal characters
ENDIF
Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform