dhtags.utils.html

Members

Functions

asString
string asString()

Convert a value of any type to a string. We need to handle floating point values separately because the 'to' function can't convert these to a string at compile-time.

camelCaseToHyphens
string camelCaseToHyphens(string s)

Convert a lower camelcase string to snake case. We can't use regex to match at compile-time so we'll iterate through the string and convert it manually.

hyphenToCamelCase
string hyphenToCamelCase(string s)

Convert a hyphen-separated string to a lower camelcase string.

hyphenToUnderscores
string hyphenToUnderscores(string s)

Replace hyphens with underscores so it can be used in mixin as a symbol.

stripMargin
string stripMargin(string s)

Strip the left margin for a multi-line string and remove newlines

underscoreToHyphens
string underscoreToHyphens(string s)

Replace underscores with hyphens to get the actual attribute name

Meta