The ParaFlow strings are carefully crafted. The modern programmer tends to spend at least as much time working with strings as they do with numbers. I. String Constants A simple string constant is enclosed in single or double quotes with no line breaks. Examples are 'Linus Pauling' and "Linus Pauling's Mother". The traditional C escapes including \n, \t, \\, and \n are used. String constants can also be line oriented. In this case the quotation is immediately followed by a line break. Everything up until a line that starts with the quotation mark is included. Some examples are: " This is a poem that wishes it were a haiku. " ' If I keep getting spammed about ways to improve my mental health, I swear I'm going to crack! ' Sometimes you have a block of text you want to use as a string, and even the line quotes won't work. For those occasions use the 'quote to marker' construct. The marker can be any symbols not including white space. The quotation includes everything between the marker and the next occurence of the marker except for the first space right after the marker. For instance the string defined by quote to CUSTOMQUOTEMARKER Hello world!CUSTOMQUOTEMARKER is the same as the string defined by "Hello world!". Normally you'd use the quote to marker construct on more complex text such as: quote to CUSTOMQUOTEMARKER "What are you doing?" I asked. "I'm trying to write a program." responded Bill. "It's full of 'if' and 'else' and 'while' and 'to' and lots of other words that look normal enough, but really aren't." "Ah, well good luck with that!" I said.CUSTOMQUOTEMARKER II. String Operations. The only operations allowed on strings are: = Assignment + Concatenation. If used with a number converts the number to a string. == Equality != Inequality < <= >= > Alphabetical comparison (ascii) You can also index an array to get a byte. The indexes are zero based. III. String Methods and Attributes. These are applied by adding a dot after the string variable. string.size - The number of characters in string. string.dupe() into string s Produce a duplicate of this string. string.start(int size) into string s Return a new string that contains just the first size letters of this string. For instance "Cat in the hat".start(3) = "Cat" string.rest(int start) into string s Returns a new string that contains all but the first start number of letters. For instance "Cat in the hat".rest(3) = " in the hat" string.middle(int start, int size) into string s Returns a new string that is the same as the size letters starting at start (which is zero based). For instance "0123456789".middle(3,5) is "34567". string.end(int size) into string s Returns a new string that contains the last size letters of this string. For instance "Catin the hat".end(3) = "hat" string.upper() Converts this string to upper case. string.lower() Coverts this string to lower case. string.append(string s) Appends s to end of this string. This tries to achieve a balance between memory usage and speed. The first call will allocate additional memory for the string, generally enough for several more operations. When the size of the buffer holding the string is increased it is increased to twice what is needed for the current append until the buffer gets quite large. At that point it just allocates 64k more than needed for the current operation. string.find(string s) into int pos Returns the position of the first occurence of s in string. This position is zero based. If s is not contained in string then it returns -1. string.findNext(string s, int startingPos) into int pos Returns the next occurence of s in string that occurs at the starting pos or later. string.words() into (array of string words) Returns the white-space-delimited words in the string. The characters space, tab, and newline are considered white space, and the white space is not included in the output words. string.tokens() into (array of string words) Returns the words in the string dilimited by white space or punctuation. The punctuation is returned as a single character word. The white space is skipped. The character '_' is not considered punctuation, and may be included in a word. string.nextWord(int pos) into (string word, int nextPos) Returns next white-space-delimited word starting at pos or later, where white space is the same as in string.words. When there are no more words the return word will be nil, and the nextPos -1. The pos should be 0 in the first call to this method, and the same as the previous nextPos in subsequent calls. string.nextToken(int pos) into (string word, int nextPos) Returns next word deliminated by the same rules as string.tokens. floatToString(double f, int digitsBeforeDecimal, int digitsAfterDecimal, bit scientific) into string s This returns a floating point number formatted just how you like it. Here's some examples: floatString(12.3456, 3, 2, 0) = " 12.35" floatString(12.3456, 0, 3, 0) = "12.346" floatString(12.3456, 0, 3, 1) = "1.234e+01" intToString(long l, int minWidth, bit zeroPad, bit commas) This returns an integer or long number formatted various ways. Here's some examples intString(1234, 0, 0, 0) = "1234" intString(1234, 6, 0, 0) = " 1234" intString(1234, 6, 1, 0) = "001234" intString(1234, 0, 0, 1) = "1,234" IV. String Plans Here are some plans for other methods: string.splitSpaced(string s) into array of string words Create an array containing white-space separated words string.splitWords(string s) into array of words separated by white space or punctuation. Punctuation marks are considered single character words. string.tokenize(string s) into array of string tokens Create an array containing an entry for each token according to some rules similar to what the paraFlow compiler uses. White space is ignored. Quoted strings are returned as a single token. string.splitWith(string s, string splitter) into array of string fields Separate string based on any of the characters in splitter. These characters will not be included in the fields output. If two of the splitter chars are next to each other it will create an empty string for that slot.