Helper to manipulate strings
Functions
Return type:
str |
Convert a camel case to sentence like Ex 'TestClass2Build' -> 'Test class2 build'
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
name | str | [description] |
Return type:
str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
size | int | 6 | |
chars | str | ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 |
Return type:
str |
Get all the values of an enum
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
enum_class | Type |
Return type:
list |
Check if a string is alphanumeric with underscore
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
str_ | str |
Return type:
bool |
Remove all whitespace of a string
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
str_ | str |
Return type:
str |
Replace accent with letter
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
str_ | str |
Return type:
str |
Returns the slugified text
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
text | str | Text to slugify `` | |
snakefy | bool | False | Snakefy the text if true (i.e. uses undescores instead of dashes to separate text words), defaults to false `` |
to_lower | bool | True | True to lower all characters, false otherwise `` |
Return type:
str |
Convert a snake case to sentence like Ex 'test_class2_build' -> 'Test class2 build'
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
name | str |
Return type:
str |
Convert a string to an enum value
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
enum_class | Type | ||
str_value | str |
Return type:
Any |
Convert a text to pascal case Ex 'test_class2_build' -> 'TestClass2Build'
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
text | str |
Return type:
str |
Convert a text to snake case Ex 'TestClass2Build' -> 'test_class2_build'
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
text | str |
Return type:
str |