3 ms·
>Newlines at the end of a string are certainly something that could get lost in transit inside an online service involving multiple runtimes. In what way could
by coldtea 3y ago
>Newlines at the end of a string are certainly something that could get lost in transit inside an online service involving multiple runtimes.
In what way could newlines at the end of a string "could get lost in transit"?
- ghusbands 3y agoIf you write it to a text file by itself and then read it from that text file, each runtime can have a different definition of whether a newline at the end of the file is meaningful or not. Under POSIX, a newline should always be present at the end of a non-empty text file and is not meaningful; not everyone agrees or is aware. There are plenty of other ways, too; bugs happen.
- coldtea 3y agoIdeally no runtime should alter strings passing through ("in transit") from one runtime to another - unless it does some processing on them.