How to remove a starting newline?
How would I remove a starting newline from a string, if it exists? Since I created the newlines using "\n" I'm not sure exactly how to check for it and then to exclude it in the revised string.
FYI I'm building a string by concatenating multiple values and starting each with a newline. Those with no value are skipped, but the end result can be a starting newline.
The logic would be something like this, but I don't know the deluge syntax or best practice, I'd think it involves startsWith, Length, and substrings:
- If the string starts with a newline
- the string = the entire right side of the string starting just after that newline
(Note that I don't want to remove all newlines. Just any starting one.)
Many thanks!