Skip to main content

underscore_separate_digits

Function underscore_separate_digits 

Source
pub fn underscore_separate_digits(s: &str, group: u32) -> String
Expand description

Insert _ separators every group digits, counting from the end of the digit run (right-to-left). Direct port of convbase_underscore in src/zsh/Src/params.c:5645-5680. Operates on the digit suffix only, preserving any BASE# prefix and leading sign.