Hi Joris
The substitution filters only work in the actions:
highway=motorway {set ref='${ref|upper:""'}
I'm not sure if these filters have to have a parameter separator.
For the tag test you should already be able to do case-insensitive
comparisons by using a regex:
name~"^(?ui:abcd)$" {action}
I think I've got this right; it should give a case-insensitive match of
'abcd'
Ticker
On Tue, 2020-06-23 at 08:45 +0000, Joris Bo wrote:
> Hi Ticker,
>
> Thanks for the answer. Your solution sounds great.
> This way it would also help people who like to do a non-casesensitive
> equation by first lowering the case of both values for example.
>
> Kind regards,
> Joris
>
>
> -----Oorspronkelijk bericht-----
> Van: mkgmap-dev <[email protected]> Namens
> Ticker Berkin
> Verzonden: dinsdag 23 juni 2020 09:53
> Aan: Development list for mkgmap <[email protected]>
> Onderwerp: Re: [mkgmap-dev] Using regex , subst, substring or other
> to translate value to propercase
>
> Hi Joris
>
> I can't think of any way to do this, but it should be easy to
> implement more substitution filters like |upper, |lower, |initcap,
> |...
>
> Ticker
>
> On Mon, 2020-06-22 at 06:25 +0000, Joris Bo wrote:
> > Hi
> >
> > Does somebody ever managed to change a tag-value to
> > propercase/titlecase?
> > For example Change: amsterdam into Amsterdam ?
> >
> > Searching the string with subst function and regex mostly works
> > fine.
> > Replace that search with a hardcoded or known stringvalue works
> > fine
> > Split the value with substring in two parts 1(a) and 2(msterdam)
> > works
> > fine.
> > But I cannot come up with a way to change the small ‘a’ into a
> > large
> > ‘A’ (besides adding 26 rules to my style 😊)
> >
> > Anybody any more ideas?
> >
> >
> > Kind regards,
> > Joris
> >
> > _______________________________________________
> > mkgmap-dev mailing list
> > [email protected]
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev