[Lazarus] Tool to convert a multiline text to a pascal string constant

Den cyraid at gmail.com
Wed Feb 3 03:05:50 CET 2016


I submitted a patch at one point that never got accepted which uses 
{$INCLUDESTRINGFILE filename} and it includes it as a string. So you 
could do:

Const SOME_TEXT = {$INCLUDESTRINGFILE sometext.txt};

- Dennis

On 2016-02-02 03:33 PM, Luiz Americo Pereira Camara wrote:
> Hi is there any tool for Lazarus to convert a multi line text (xml 
> snipet, SQL) to a string constant?
>
> Currently i'm using the following regular expression
>
> http://regexr.com/3cna5
>
> If some one knows a better regular expression that handles putting ';' 
> instead of '+ LineEnding +' in last line would help also
>
> Luiz
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160202/ae5a9734/attachment-0003.html>


More information about the Lazarus mailing list