Skip to main content

insert_at

Function insert_at 

Source
pub fn insert_at(original: &str, offset: usize, new_content: &str) -> String
Expand description

Insert new_content at offset. Equivalent to replace_range(original, offset..offset, new_content), expressed plainly because insertion is the common case for adding new keys.