Interesting. The phrase "the values of \r and \n vary from system to system" came right out of the Camel book. I almost put it in quotes with attribution. It's in a discussion of using \015\012 especially for socket programming because you'll need to recognize those hard values coming across the network regardless of what your local concept of "newline" is.
In this case, the OP refers to data coming from a "phone switch", which I'm guessing is also not likely to change its delimiters if the local concept of "newline" changes from the time the interface code is written to the time it's used.
Thanks for pointing out where the magic number rule came from. Given how old Macs are disappearing, I might not have recommended what I did, but I think this case is special enough that the exception might not be all bad.
In reply to Re^3: question about "split" function (magic numbers)
by kyle
in thread question about "split" function
by rimvydazas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |