Skip to main content

clean_int_str

No overview available.

def clean_int_str(
value: string
) - > string

Cleans a string representation of an integer by removing non-numeric characters and whitespace. Use this to sanitize raw input before converting it to a numeric type.

Parameters

NameTypeDescription
valuestringThe raw input string containing the integer value to be cleaned.

Returns

TypeDescription
stringThe sanitized string containing only numeric digits, or an empty string if no digits were found.