|
-
May 22nd, 2002, 07:43 AM
#1
Read escape sequences from FILE
Does anybody know how to read from file a string with escape character like '\n' ?
Of course I don't want to read the caracter '\' followed by 'n' but keep the espace C character into the destination buffer.
Do I really need to write a parser that should translate '\n' and other escape sequences into hexa code ??
Thanks!!
-
May 22nd, 2002, 08:47 AM
#2
It really depends on how you read the file, most will automatically
read the escape character. However some functions like fgets will
'eat' the newline character as its pressence is implied at the end
of the string since it performs a dleimited get on that character
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|