Skip to content

Instantly share code, notes, and snippets.

@rhysd
Created December 27, 2016 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhysd/fac367c26bd4eeb443a8d97bf707c0e7 to your computer and use it in GitHub Desktop.
Save rhysd/fac367c26bd4eeb443a8d97bf707c0e7 to your computer and use it in GitHub Desktop.
pub fn insert(target: &mut String, index: usize, replaced: &str) {
for c in replaced.chars().rev() {
target.insert(index, c);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment