string module¶
- toolbox.string.camel_to_snake(name: str) str¶
Convert camelCase or PascalCase to snake_case.
- Args:
name (str): The camelCase or PascalCase string.
- Returns:
str: The snake_case representation.
- toolbox.string.compress_string(text: str) str¶
Compress a UTF-8 string using zlib and encode the result in base64.
- Args:
text (str): The input string to compress.
- Returns:
str: The base64-encoded compressed string.
- toolbox.string.decompress_string(text: str) str¶
Decode a base64-encoded string and decompress it using zlib.
- Args:
text (str): The base64-encoded compressed string.
- Returns:
str: The decompressed UTF-8 string.
- toolbox.string.slugify(value: str) str¶
Convert a string to a slug suitable for URLs.
- Args:
value (str): The input string.
- Returns:
str: A slugified version of the string.
- toolbox.string.snake_to_camel(name: str) str¶
Convert snake_case to CamelCase.
- Args:
name (str): The snake_case string.
- Returns:
str: The CamelCase representation.