Hey, I am using Nodebox for a while now and while the documentation is sparse this forum has been a valuable source for a deeper understanding and tipps and tricks.
I think I can contribute on trick that I have not read about in the other posts yet.
Problem:
I wanted to import a CSV file from an online source. So I could not rely on the CSV import node, but had to parse the server response into a table on my own.
For that I needed to split the string by line breaks at some point. But none of the string related nodes let's you input a line break anywhere.
So I ended up writing a little custom node that let's you specify a character by ASCII/unicode number.
I also read about John's approach of importing the file, looking for any new-line character present, isolating that character and then using that one going forward.
Solution:
Recently I stumbled across a nice way by accident:
The format number node is using a specific syntax (Python, Java, Jython?). While reading up on that I noticed that the syntax also allows you to specify a new line character. For example to format a date and time into two separate lines:
2025-Jan-01
1:30PM
So if you just specify the format of the number to be %n, the format number node will output a single new line character that you can use to split a long text by lines or to insert a line break into a single string.
P.S.: I wanted to attach an example, but the previous attempt to post this did not go through. So I'm trying again without.