Module string

Module string 

Source
Expand description

String processing utilities

Functionsยง

camel_to_snake
Convert camelCase to snake_case
count_lines
Count lines in a string
dedent
Remove common leading whitespace from all lines
extract_identifier
Extract identifier/name from a file path
is_likely_binary
Check if string is likely binary content
snake_to_camel
Convert snake_case to camelCase
truncate
Truncate a string to a maximum length, adding ellipsis if needed