[Lazarus] CreateRelativePath document error.

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Feb 9 10:04:27 CET 2010


Juha Manninen wrote:
> 
> Is there such a function hidden somewhere in FPC/Lazarus vast amount of code?

I wouldn't know, but I have my own version of trimming long paths and
rather use ellipse (...) to denote hidden information. Using Unicode, the
'...' could probably be reduced to one unicode character (…).

See attached test program with path trim function. Maybe it could be useful
 to you.


Sample output:

$ ./trimming_long_paths
/Users/milipili/Projec...r1/pixie/client/src/pixie/pixie.lpi
/home/graemeg/programm..._AdrsBook_MGM/Demo_AdrsBook_MGM.lpi


The trim function can be told how long to make the resulting text, which
side to trim from and how long the remaining (right side) text should be.
Above I used a limit of 60 characters and 35 character on the right of the
ellipse.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: trimming_long_paths.pas
Type: text/x-pascal
Size: 1009 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100209/33ab521e/attachment-0002.pas>


More information about the Lazarus mailing list