Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying elements of strings in simple way howto
Message
From
14/02/2005 19:01:45
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
Miscellaneous
Thread ID:
00986136
Message ID:
00986850
Views:
34
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform