str_as_bool
Converts a string representation of a boolean value into its corresponding boolean type, supporting common truthy and falsy strings.
def str_as_bool(
val: string
) - > boolean
Converts a string representation of truth into a boolean value.
Parameters
| Name | Type | Description |
|---|---|---|
| val | string | The string value to be evaluated for truthiness. |
Returns
| Type | Description |
|---|---|
boolean | The boolean interpretation of the input string; returns True for 'true', '1', 't', 'y', or 'yes', and False otherwise. |