Skip to content

Instantly share code, notes, and snippets.

@NunoLava1998
Created February 12, 2017 10:58
Show Gist options
  • Save NunoLava1998/fcd06153ffbf851b3710465c291fb926 to your computer and use it in GitHub Desktop.
Save NunoLava1998/fcd06153ffbf851b3710465c291fb926 to your computer and use it in GitHub Desktop.
if (strcmp(echo_check_char, "echo ") == 0) {
size_t size = strlen(com);
for (size_t i = 0; i <= 6; i++) {
size--; // Decrement size.
}
char *value = '\0';
for (size_t i = strlen(echo_check_char) + 1; i < strlen(com); i++) {
value[i] = com[(size_t)i];
}
writes("\n", 0, 15);
writes((const char*)value, 0, 15);
writes("\n", 0, 15);
com = zero_string(com);
writes(">", 0, 15);
return com;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment