I need to find the length of the characters in a string left of a found word using GETWORDNUM
When I get to this point, I need a character count (including spaces) left of the specific word number. I can't use AT or similar because I don't know how many occurances there are left of the specific word located with GETWORDNUM. The answer is probably staring me in the face, I just can't see the wood for the trees right now!
Code:
lnWcnt=GETWORDCOUNT(lcLine)
lnChr=0
lcFoundNext=.f.
FOR i = 1 TO lnWcnt
lcCheckWord = GETWORDNUM(lcLine,i)
SELECT cWrongWords
GO TOP
SCAN
IF ALLTRIM(cWord) = lcCheckWord
lcFoundNext=.t.
EXIT
ENDIF
ENDSCAN
IF lcFoundNext=.t.
EXIT
ENDIF
ENDFOR
When I get to this point, I need a character count (including spaces) left of the specific word number. I can't use AT or similar because I don't know how many occurances there are left of the specific word located with GETWORDNUM. The answer is probably staring me in the face, I just can't see the wood for the trees right now!