module documentation
Common utilies (mostly of the string variety)
| Function | hex |
Helper function for formatting hex data |
| Function | mode |
Format a Flags field akin to an on-calc mode selection |
| Function | replacer |
Iteratively applies string replacements |
| Function | split |
Splits a string in any of several naming cases into separate words |
| Function | squash |
Removes all spaces from a string |
| Function | trim |
Trim a list to some length (from the right), then join it, indicating if any trimming occurred by an ellipsis |
| Function | trim |
Trim a string (from the right) to some length, indicating if any trimming occurred by an ellipsis |
Helper function for formatting hex data
The format specifier takes the form {width}?{case}{sep}?.
- width is the width of groups of hex digits; negative values group from the end (defaults to no groups)
- case is x or X to dictate the case of the hex digits
- sep is a single character to separate groups of hex digits (defaults to none)
| Parameters | |
data:bytes | The data to format |
formatstr | The f-string specifier to format the hexdump |
| Returns | |
str | data formatted in hex with some width, case, and separator |