From Dark and Darker Wiki
This is the documentation page for Module:Utilities
Overview
Utility functions
Functions
insert_space_before_capitals
Adds spaces before capital letters (other than if its the first character). i.e. "ElementalBolt" -> "Elemental Bolt"
Can be invoked within wikitext, or called within another lua module. See Module:MergeSpells for an example that utilizes this module.
Parameters
- input_text - input string
Examples
{{#invoke:Utilities|insert_space_before_capitals|ElementalBolt}}
Elemental Bolt
dash_for_space
Replaces all spaces with dashes. i.e. "Physical Damage" -> "Physical Damage". Useful for turning text into something that can be used as a css class.
See Module:Enchantments for an example that utilizes this module.
Parameters
- input_text - input string
Examples
{{#invoke:Utilities|dash_for_space|Physical Damage}}
Physical-Damage1