(the printf's are for debugging)Code:bool chomp(char *s) { for(int i = 0;s[i] != '\0'; i++) { if(s[i] == '\n') { s[i] == '\0'; printf("chomp returned true\n\n"); return true; } } printf("chomp returned false\n\n"); return false; }
the function returns true, yet still doesn't do it's job. I've looked through many times, and can't see what's wrong.