logo separator

[mkgmap-dev] Substring returns full string

From Steve Ratcliffe steve at parabola.me.uk on Fri Nov 28 11:11:20 GMT 2014

Hi Gerd

> In ValueBuilder

> we receive the string  " substring:1:14"
> (with the leading blank) and that is not removed, so we don't match

OK, so this works if you quote the argument:
   '${rcnname | substring:"1:14"}'

but not with the old syntax.

The attached patch fixes this and I think it is safe against
breaking existing styles.  If it does break old styles, then
it will have to be un-applied - in general the old syntax
is ambiguous.

I've added an error check for when an unknown filter is seen,
which should make it obvious when something like this happens.

..Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Spaces_around__|__fails_with_old_arg_syntax_.patch
Type: text/x-patch
Size: 2650 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141128/734fbc70/attachment.bin>


More information about the mkgmap-dev mailing list