home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / htmlks10.zip / AddHtml.erx < prev    next >
Text File  |  1997-09-03  |  730b  |  32 lines

  1. /*returns a string*/
  2. PARSE ARG kase Col theText
  3. parse value theText with 'F_FILE='FullFile'F_TEXT='FileText'_LINE='theLine
  4.  
  5. Col=Col-1
  6. if (Col<0) then Col=0
  7. leftLine=left(theLine, Col)
  8. rightLine=right(theLine, length(theLine)-Col)
  9.  
  10. x=0
  11. title=''
  12. do while x<10
  13.  
  14. line = linein(FullFile)
  15.  
  16. if pos('<title>', line)<>0 then do
  17.     title=right(line, length(line)-pos('<title>', line)-6)
  18.     title=left(title, pos('</title>', title)-1)
  19.     leave
  20.     end /*<title>do */
  21. else if pos('<TITLE>', line)<>0 then do
  22.     title=right(line, length(line)-pos('<TITLE>', line)-6)
  23.     title=left(title, pos('</TITLE>', title)-1)
  24.     leave
  25.     end /*<TITLE>do*/
  26. x=x+1
  27. end
  28.  
  29. call etkreplacetext leftLine'<A HREF="'FileText'">'title'</A>'rightLine
  30.  
  31.  
  32.