snakeoil.strings module

String related methods.

snakeoil.strings.doc_dedent(s: str) str[source]

Support dedenting docstrings with initial line having no indentation.

snakeoil.strings.pluralism(obj: int | Sized, none: str | None = None, singular='', plural='s') str[source]

Return singular or plural suffix depending on object’s length or value.