Maybe sprintf which takes one paremter: the format. Same for a regexp
function.

Beside these generic functions, my only other real use case is to extract
the hostname from a URL, as stated in the description.

Thanks man, nice work! Please keep in mind, I'm more a reporter of tickets,
please don't change any priorities Julius set (in case he did) because of
me ;)
On Mar 31, 2014 10:11 PM, "stuart nelson" <notifications@github.com> wrote:

> In app/assets/javascripts/angular/services/variable_interpolator.js:
>
> >
> >    return function(str, varValues) {
> > +    function toPercent(label) {
> > +      return parseFloat(label, 10) * 100 + "%";
> > +    }
> > +    function toInt(label) {
> > +      return parseInt(label*100, 10);
> > +    }
>
> @grobie <https://github.com/grobie> do you have a list of generic
> functions you would like implemented? (toInt was just tossed in so I had
> a couple functions to work with)
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/prometheus/promdash/pull/107/files#r11145408>
> .
>