Posted on July 31, 2004. Filed under: Visual FoxPro |

I’m almost too embarassed to mention this…
I found a VFP function STREXTRACT() for extracting text from a string.
Yep, I have the following code all over the place:

nStart = AT(‘Starting text’, cString)
nEnd = AT(‘End text’, cString)
cSubString = SUBSTR(cString, nStart, nEnd – nStart)

which can now be replaced with:
cSubString = STREXTRACT(cString, ‘Starting text’, ‘End text’)


Make a Comment

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: