mrdocs::helpers::registerStringHelpers

Register string helpers into a Handlebars instance

Synopsis

Declared in <mrdocs/Support/Handlebars.hpp>

void
registerStringHelpers(Handlebars& hbs);

Description

This function registers a number of common helpers that operate on strings. String helpers are particularly useful because most applications will need to manipulate strings for presentation purposes.

All helpers can be used as either block helpers or inline helpers. When used as a block helper, the block content is used as the first argument to the helper function. When used as an inline helper, the first argument is the value of the helper.

The helper names are inspired by the default string functions provided in multiple programming languages, such as Python and JavaScript, for their default string types.

The individual helpers are defined as an implementation detail and cannot be registered individually.

Parameters

Name Description

hbs

The Handlebars instance to register the helpers into

Created with MrDocs