[ipxe-devel] add support for trimming whitespaces from strings

Christian Hesse list at eworm.de
Fri Nov 29 12:36:51 UTC 2013

Thomas Mieslinger <miesi at pc-h.de> on Fri, 2013/11/29 13:23:
> On 29.11.13 12:16, Christian Hesse wrote:
> > I would like to trim the trailing whitespaces. This is not possible yet,
> > no? I added a new modifier "stringtrim". Using ${product:stringtrim} now
> > results in just "Latitude E6500". Any comments?
> This is a good idea, but is ${product:stringtrim:uristring} possible? Or 
> do I need

I think you can only use one modifier at a time. So we would need
uristringtrim or your solution with a temporary variable.

> p=${product:stringtrim}
> ${p:uristring}

The syntax is different, though:

set p ${product:stringtrim}
echo ${p:uristring}
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Chris           get my mail address:    */=0;b=c[a++];)
putchar(b-1/(/*               gcc -o sig sig.c && ./sig    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20131129/387b745f/attachment.sig>

More information about the ipxe-devel mailing list