in reply to C style strings
Back when I was using C a lot (before Unicode) strings were just arrays of char which are 8 bit unsigned integers.
So a 12 character string like "Hello world\n" is the 13 element array 72 101 108 108 111 32 119 111 114 108 100 10 0
The Linux ascii man page lists the C escape sequences:
007 7 07 BEL '\a' (bell)
010 8 08 BS '\b' (backspace)
011 9 09 HT '\t' (horizontal tab)
012 10 0A LF '\n' (new line)
013 11 0B VT '\v' (vertical tab)
014 12 0C FF '\f' (form feed)
015 13 0D CR '\r' (carriage ret)
Which are the same in Perl except for \v which Perl doesn't use.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: C style strings
by kcott (Archbishop) on Dec 31, 2022 at 21:07 UTC |