[mkgmap-dev] New filter function trim
From Franco Bez franco.bez at web.de on Sat Apr 20 15:21:07 BST 2013
|Hi all, thanks for the feedback. I've chosen to rename the filter to "part" As this is what it does, it returns only a part of the value. I gave it 2 optional arguments, a separator and a partnumber the separator defaults to semicolon, the partnumber to 1 so ${destination|part} will return the first part of a list separated by semicolons, "München;Augsburg" will become "München". and $(ref|part:-:5} will return "B12" on "A96-E143-A30-B17-B12-A45" a patched binary is here: http://files.mkgmap.org.uk/download/111/mkgmap.jar attached is the PartFilter.java and the diff for ValueBuilder.java and rule-filters.txt | -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20130420/8b132b73/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: part_filter_src.diff Type: text/x-patch Size: 1534 bytes Desc: not available Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20130420/8b132b73/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: PartFilter.java Type: text/x-java Size: 1661 bytes Desc: not available Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20130420/8b132b73/attachment-0001.bin
- Previous message: [mkgmap-dev] New filter function trim
- Next message: [mkgmap-dev] New filter function trim
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list