Boost logo

Boost-Build :

Subject: Re: [Boost-build] jam rule to replace characters in a string
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-02-22 10:04:39


On 02/21/2012 01:41 AM, Marc Dürner wrote:
> Hello,
> Is there a way to replace characters in a jam variable? GNU make has a
> number of functions for string transformations. I have only found the
> builtin rules MATCH and SUBST. Could we add some more rules (I could
> help here and write the rules)?
> Here is a list of the GNU make string functions and the comparable jam rules:
> $(subst from,to,text)
> $(patsubst pattern,replacement,text) -> SUBST
> $(strip string)
> $(findstring find,in) -> possibly MATCH
> $(filter pattern...,text)
> $(filter-out pattern...,text)
> $(sort list) -> SORT
> make's subst is the character replacement function I am looking for:
> $(subst ee,EE,feet on the street)
> substitutes the string `fEEt on the strEEt'.

Boost.Build has regex.replace.

In Christ,
Steven Watanabe

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at