BioBIKE
(SPLIT string [delimiter])
- Breaks up a string into a list
- Splits at the given single-character delimiter
- If no delimiter given, then splits at a space
- Multiple contiguous delimiters are compressed to one
- Eventually, function will serve to split other types of objects (e.g. lists, sets)
Example:
(DEFINE input-line AS "all4312, Anabaena PCC7120, chromosome, 5166997, 5167767, b")
:: "all4312, Anabaena PCC7120, chromosome, 5166997, 5167767, b"
(SPLIT input-line ",")
:: ("all4312" " Anabaena PCC7120" " chromosome" " 5166997" " 5167767" " b")
Suppose you're reading from a tab-delimited file (such as that output by Excel). Here the first DEFINE simulates reading in one line from the file. The line is split into its component parts. Note that the function does not strip away leading blanks.