diff options
| author | jmoenig <jens@moenig.org> | 2013-07-31 15:15:27 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-07-31 15:15:27 +0200 |
| commit | 6fa1fcd87637cae8f0ad76951b7b389db6bfa969 (patch) | |
| tree | bbe58828c6572490023a74b8710211854f537f2c /threads.js | |
| parent | e062dfe54862012a6d2fbe4044462c8bc2696711 (diff) | |
| download | snap-yow-6fa1fcd87637cae8f0ad76951b7b389db6bfa969.tar.gz snap-yow-6fa1fcd87637cae8f0ad76951b7b389db6bfa969.zip | |
experimental text SPLIT primitive in the operators category
(currently only accessible in dev mode)
Diffstat (limited to 'threads.js')
| -rw-r--r-- | threads.js | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2013-July-30'; +modules.threads = '2013-July-31'; var ThreadManager; var Process; @@ -2000,6 +2000,18 @@ Process.prototype.reportUnicodeAsLetter = function (num) { return String.fromCharCode(code); }; +Process.prototype.reportTextSplit = function (string, delimiter) { + var str = (string || '').toString(), + del; + + if (this.inputOption(delimiter) === '--line--') { + del = '\n'; + } else { + del = (delimiter || '').toString(); + } + return new List(str.split(del)); +}; + // Process debugging Process.prototype.alert = function (data) { |
