Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying elements of strings in simple way howto
Message
De
14/02/2005 19:01:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
00986136
Message ID:
00986850
Vues:
33
What is your actual use case? That is, what do you need to do with each character (print, store, operate in some other way)? Is performance an issue? What character can appear in the string (any control character, etc.)?

>Hello All,
>
>I want to split a string in its distinct elements , i have the next code
>
>
>cName = "Zakaria"
>DIMENSION aLetters(LEN(cName))
>i = 0
>FOR EACH cLetter IN aLetters
>	i = i + 1
>	aLetters[i] = SUBSTR(cName,i,1)
>	? aLetters[i] +  CHR(13)
>ENDFOR
>
>
>
>
>I'm sure this can be done simpler. Could you explain me how?
>
>Thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform