dj_angles.caseconverter.kebab¶
Module Contents¶
- class dj_angles.caseconverter.kebab.Kebab(s, delimiters=DELIMITERS, strip_punctuation=True)¶
Bases:
dj_angles.caseconverter.caseconverter.CaseConverter
- JOIN_CHAR = '-'¶
- define_boundaries()¶
Define boundary handlers.
define_boundaries() is called when a CaseConverter is initialized. define_boundaries() should be overridden in a child class to add boundary handlers.
A CaseConverter without boundary handlers makes little sense.
- prepare_string(s)¶
Prepare the raw intput string for conversion.
Executed during CaseConverter initialization providing an opportunity for child classes to manipulate the string. By default, the string is not manipulated.
Can be overridden.
- mutate(c)¶
Mutate a character not on a boundary.
Can be overridden.
See convert() for call order.
- dj_angles.caseconverter.kebab.kebabify(s, **kwargs)¶
Convert a string to kebab case
Example
Hello World => hello-world