Re: String Character Conversion





Jayson Davis wrote On 06/30/06 11:46,:

Say I have a string read from a configuration file.

searchfor <tab> Needle\n\n

Where I want to search for the word "Needle" with two linefeeds. Now
when I read it from the file, it hasn't converted the linefeeds into
characters. Is there a function to do that or do I need to write it myself?

Please explain what you mean by "it hasn't converted ..."
The newline characters *are* characters, and can be read and
written just like vowels and consonants.

--
Eric.Sosman@xxxxxxx

.



Relevant Pages

  • Re: String Character Conversion
    ... Now when I read it from the file, it hasn't converted the linefeeds into characters. ... The string as read is "Needle\n\n", but what the string really needs to be is "Needle\x0A0\x0A" in order for strstror strcmpto work. ...
    (comp.lang.c)
  • Re: String Character Conversion
    ... Where I want to search for the word "Needle" with two linefeeds. ... The newline characters *are* characters, ... The string as read is "Needle\n\n", but what the string really needs to ...
    (comp.lang.c)
  • Re: String Character Conversion
    ... Say I have a string read from a configuration file. ... Where I want to search for the word "Needle" with two linefeeds. ... hasn't converted the linefeeds into characters? ...
    (comp.lang.c)
  • String Character Conversion
    ... Say I have a string read from a configuration file. ... Where I want to search for the word "Needle" with two linefeeds. ... Now when I read it from the file, it hasn't converted the linefeeds into characters. ...
    (comp.lang.c)