Skip to main content

Crate normalize_edit

Crate normalize_edit 

Source
Expand description

Symbol-aware file editing for normalize.

Provides utilities to locate symbols within source files and apply targeted text replacements — used by normalize edit to rewrite functions, methods, and other named constructs without touching the rest of the file.

Structs§

ContainerBody
Location of a container’s body (for prepend/append editing operations)
Editor
Editor for structural code modifications
SymbolLocation
Result of finding a symbol in a file

Functions§

line_to_byte
Convert a 1-based line number to byte offset in content. Clamps to content length for safety (last line may not have trailing newline).
replace_all_words
Replace all whole-word occurrences of old in text with new_word. Returns the original string unchanged if no occurrences are found.