3 ms·
This problem exists even if we ignore unicode. What is the reverse of the following string? foo\r\n\bar I imagine the most useful answer if you are writin
by DougBTX 17y ago
This problem exists even if we ignore unicode. What is the reverse of the following string?
foo\r\n\bar
I imagine the most useful answer if you are writing a notepad-level application would be:
rab\r\n\oof
- voidpointer 17y agoAt the level of abstraction I would expect from a String object, the reverse of \r\n should be \n\r. Basically, you example is another encoding issue. I think strings should be free from any encoding concerns. Those should be handled when parsing/serializing.