Skip to content

Instantly share code, notes, and snippets.

@AlexanderBrevig
Created July 8, 2013 04:59
Show Gist options
  • Save AlexanderBrevig/5946318 to your computer and use it in GitHub Desktop.
Save AlexanderBrevig/5946318 to your computer and use it in GitHub Desktop.
avoid multiple traversals of strings that is implied by using strcat
void str_append_from(char *original, int &idx, const char *append) {
while (*append) {
original[idx++] = *append++;
}
original[idx] = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment