VFP function to get the first line of a piece of text

March 24, 2006 @ 12:20 pm by walter — Filed under: Visual FoxPro

This is the story of a useful little utility function to extract the “first line” out of a block of multi-line text. If all you want is the function, then you can stop on the first page. If you’re interested in how someone can spend an hour writing a simple function that is less than 25 lines long, and why it ended up how it is, then read to the gory end!

function GetFirstLine( tcText [, tnMaxLen] [, tcEllipses] )
(more…)