Module value_parsing

Module value_parsing 

Source

Functions§

is_bool_str
Check if a string can be parsed as a boolean
is_bool_value
Check if a DataValue can be considered a boolean
parse_bool
Parse a string into a boolean value using consistent rules across the codebase Accepts: true/false, t/f, yes/no, y/n, 1/0 (case-insensitive except for numbers)
parse_bool_strict
Parse a string into a boolean for CSV loading (excludes numeric forms) Only accepts: true/false, t/f, yes/no, y/n (case-insensitive)
parse_value
Parse a string value into the appropriate DataValue type Order of precedence: Null -> Boolean (text only) -> Integer -> Float -> DateTime -> String Note: “1” and “0” are parsed as integers, not booleans, for data consistency