monster.util.formatVariableToDisplay()#

Syntax#

monster.util.formatVariableToDisplay(string);

Parameters#

string: String (mandatory)#

Text that will be changed into a formatted text.

Return#

This method returns a String.

Description#

This method allow developers to transform text coming from the back-end (for example Service Plan items...) that hasn't been i18ned to be displayed in a more user-friendly way than just displaying the variable name.

Examples#

  • Transforms a variable into a more readable String
monster.util.formatVariableToDisplay('this_is_a_test');
// output: 'This Is A Test'

Edit this page here