Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Chopping characters
Message
De
02/07/2005 06:10:19
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01027078
Message ID:
01028464
Vues:
9
>Does anybody know how I can programmatically chop characters off at the first space within a value. For example if the value is Morocco Tops then I want to see Morocco and if the value is Turkish Fabric then it should say Turkish.
>
>Any help would be greatly appreciated

The function at() do what you need.
Ex:
x = "My String"
y = at(" ", x)
z = substr(x,1, y - 1)

or

x = "My String"
z = substr(x, 1, at(" ", x) - 1)

Joaquim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform