Strings

Because labels are essential to how Planarly works, strings (text) in cells need to be explicitly marked. There are two formats for marking string content:

Double quotes - "Example string"

This format is necessary for strings embedded in formulas and must be used in cells where you want to use strings containing escaped characters like \\n.

Leading single quote - 'Example string

This format can only be used to set a cell's content. Note that it ignores escaped characters. 'Line\\nbreak will be interpreted and displayed exactly as it appears. Use double quotes as above if you want escaped characters to be correctly interpreted in formulas, particularly string functions like Split().

String manipulation functions

LStrip(#a), RStrip(#a), Strip(#a)

LStrip(#a) - removes leading white space from all strings in the table #a.

RStrip(#a) - removes trailing white space from all strings in the table #a.

Strip(#a) - removes leading and trailing white space from all strings in the table #a.

Split(#a, [delim]), VSplit(#a, [delim])

Split(#a, [delim]) - Splits the strings in table #a at any character that appears in delim. delim is an optional 1x1 table containing a string of delimiter characters. If delim is not specified then the default delimiter set of "\n\r \t" is used. Split(#a) processes #a row by row, expanding strings horizontally. Any empty strings that result are skipped over.

Screenshot 2021-12-07 at 16.05.27.png

VSplit(#a, [delim]) - works like Split() except it splits the strings in #a into vertical columns of tokens. If delim is not specified, then the default delimiter set of "\n\r" is used.

Note this delimiter set is different to the one used by Split(). It allows a nested call of Split(Vsplit(#a)) that splits strings first vertically into lines and then horizontally into words. In the example below, the \\n after the word Red is rendered as a space in the interface.