I have a text string that I grab from a Memo field.
What I need to do is find out if certain text in that string is located in the first column of whatever line it may appear in.
Example of the text:
>>
Hello, this is a TEST.
This is another line.
TEST again.
Some other text in the string.
<<
In this case, the word TEST shows up twice. I need to somehow be able to know if TEST starts at column 1.
Test to see if text is in column 1
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Test to see if text is in column 1
Thanks,
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Re: Test to see if text is in column 1
Jeff:
Perhaps the AT() function can helps.
Sample
Regards
Perhaps the AT() function can helps.
Sample
Code: Select all
nAtRE := AT("&RE=",oWrk:TXT)
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Test to see if text is in column 1
Jeff,
Something like this:
EMG
Something like this:
Code: Select all
FOR i = 1 TO MLCOUNT( cMemo )
cLine = MEMOLINE( cMemo, , i )
IF cLine = cTxt
// Found!
ENDIF
NEXT
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Re: Test to see if text is in column 1
Thanks
Thanks,
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)