Boost logo

Boost-Build :

Subject: [Boost-build] jam rule to replace characters in a string
From: Marc Dürner (marc.duerner_at_[hidden])
Date: 2012-02-21 04:41:13


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'.

regards,
Marc


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk