whisker_names: whisker_names

Description Usage Arguments Value References See Also Examples

View source: R/whisker_names.R

Description

Extract varaibles names from a whisker template

Usage

1
2
3
whisker_names(template)

whisker_vars(template)

Arguments

template

character of template text

Provides a stringr type function for extracting the names for the substituted variable. This is useful if you want to do some checking or other manipulation of the template prior to rendering.

Value

chracter vector of names found in the template

References

See for example, http://stackoverflow.com/a/16596015/1504321

See Also

whisker_render
stri_extract_all_regex on which this function relies

Examples

1
2
3
  template <- "Dear {{name}}, I have not loved you since {{date}}"

  whisker_names(template)

decisionpatterns/whisker.tools documentation built on July 1, 2020, 4:18 p.m.