import textkit; cuts text by literal markers and lines: no regex, no escaping, no positions; case-sensitive. Missing marker → null; found but empty → "" (truthy, so : fallback works). null input → null, so a chain needs one check at the end.
import textkit;
var title = textkit.between(html, "<title>", "</title>") : "untitled"; // first pair, markers excluded
var key, value = textkit.splitOnce(line, "="); // TWO values, not an array; both null if no "="
var code = textkit.mapLines(src, function(line, lineNo){
if(string.indexOf(line, "DEBUG")) return false; // false = drop line; no return = keep; string = new line text
});
before(s,mark), after(s,mark) → first match; replaceBetween(s,begin,end,new) keeps the markers → new text | null.indent(s,prefix) prefixes non-blank lines ('\t', " ", "> ", "// "); dedent(s) strips the common leading SPACE/TAB (TAB != spaces). Move a block: textkit.indent(textkit.dedent(block), " ").fn returns line text only, never the EOL.string instead: split all → string.splitLiteral(s,sep) (string.split = char set!); replace all → string.replaceLiteral(s,old,new); EOL → string.crlf(s,'\n'); patterns, positions, length → string.match/find/slice, #s.