Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pickup first characters in a string
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00692996
Message ID:
00693005
Vues:
27
Nick,

If you are guaranteed that the first letter of each word is capitalized this would be faster than the other solutions:
acronym = chrtran( TheString, "abcdefghijklmnopqrstuvwxyz ", "" )
And if you don't already have all uppercase first letters:
acronym = chrtran( proper( TheString ), "abcdefghijklmnopqrstuvwxyz ", "" )
>I am trying to pick out first character in a string for example:
>
>Chief Probation Officer
>
>I need to return
>
>CPO
>
>
>I there a quick way of doing this, I will need to perform this operation on hundreds of strings. If there is no straight forward way of doing this then do I put each character in an array and search the array ?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform