N
No Such Luck
I have a string that is behaving stangely:
strlen(string) = 25
printf("%s!\n", string);
#This is a comment test
!
Conclusions: There is a newline in the string, and there is also a
discrepancy between the result of strlen, and the string printed, even
including the newline.
So I scan the string, and replace '\n' with '\0'
printf("%s!\n", string);
!This is a comment test
This one really has me stumped. Any idea what that unaccounted for
character is? It's acting like hitting the "home" key. What char can I
compare against?
Thanks for any help.
strlen(string) = 25
printf("%s!\n", string);
#This is a comment test
!
Conclusions: There is a newline in the string, and there is also a
discrepancy between the result of strlen, and the string printed, even
including the newline.
So I scan the string, and replace '\n' with '\0'
printf("%s!\n", string);
!This is a comment test
This one really has me stumped. Any idea what that unaccounted for
character is? It's acting like hitting the "home" key. What char can I
compare against?
Thanks for any help.