I’m trying to get the contents of the current code editor split into an array of lines.
I keep getting a compile error which I think is related to ReplaceLineEndings
:
// This fails:
Var normalised As String = ReplaceLineEndings(Text, EndOfLine.Unix)
// This also fails:
Var normalised As String = Text.ReplaceLineEndings(EndOfLine.Unix)
As far as I can tell from the docs (which are not great for IDE scripting) is that ReplaceLineEndings
is available in Xojoscript so what am I doing wrong?
Essentially I just want to get the code editor contents into an array of lines and I also need to be able to rejoin an array back into lines of code at the end of the script. Can anyone point out what I’m doing wrong please?