Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a function that returns range of words?
Message
From
22/04/2004 14:48:09
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00897321
Message ID:
00897335
Views:
18
>Thanks Sergey for the Reply,
>
>Guess, I have to write one myself.
>
>Dawa

at() can give you the position of the n'th separator. You can then use substr() to get the text in-between.

A problem may arise with the definition of "word":
Word1   Word2
Is Word2, above, the second word? Counting the separators (the three spaces), it would be the fourth. Depending on how you want to handle this, you may need additional adjustments. Repeatedly replacing a double space with a single space will get rid of unwanted spaces. See strtran().
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform