fl_server_core.utils.strings ¶
Functions:
| Name | Description |
|---|---|
str2bool | Convert string to boolean. |
Functions¶
str2bool ¶
Convert string to boolean.
Sources: https://stackoverflow.com/a/43357954
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
| str | value to convert | required |
| bool | None | Fallback if value can not be converted. If None raise ValueError. Defaults to None. | None |
Raises:
| Type | Description |
|---|---|
ValueError | value can not be converted and no fallback is specified |
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | boolean interpretation of value |
Used by:
- API Reference
fl_serversettings