Extract a structure from the string

@param {*} str
169795
function
  tlid__xtro(str) {
  var r = new Object();
  r.tlid = "-1";
  r.src = str;
  r.txt = "";
  // r.deco = "";

  if (tlid__has(str)) {
    r.tlid = tlid__xtr(str);
    r.txt = str.replace(r.tlid + " ", "") // try to clear out the double space
      .replace(r.tlid, "") // if ending the string, well we remove it
      .replace("@tlid ", ""); //remove the decorator

  }

  return r;
}
61494
function unescapeString(str) {
    let i = 0, result = '';
    const len = str.length;

    while (i < len) {
        const ch = str[i++];
        result += (ch === '\\') ? (str[i++] || '') : ch;
    }

    return result;
}
24516
function(str, indent) {
			var lines = str.split("\n");
			for (var i=0; i<lines.length; i++)
				lines[i] = indent + lines[i];
			return lines.join("\n");
		}
1010792
public static Parser<Void> string(String str) {
    return Patterns.string(str).toScanner(str);
  }
916090
function parse(str) {
	str = '(' + str.trim() + ')';

	/**
	 * expr
	 */

	return expr();

	/**
	 * Assert `expr`.
	 */

	function error(expr, msg) {
		if (expr) return;
		var ctx = str.slice(0, 10);
		assert(0, msg + ' near `' + ctx + '`');
	}

	/**
	 * '(' binop ')'
	 */

	function expr() {
		error('(' == str[0], "missing opening '('");
		str = str.slice(1);

		var node = binop();

		error(')' == str[0], "missing closing ')'");
		str = str.slice(1);

		return node;
	}

	/**
	 * field | expr
	 */

	function primary() {
		return field()
			|| expr();
	}

	/**
	 * primary (OR|AND) binop
	 */

	function binop() {
		var left = primary();

		var m = str.match(/^ *(OR|AND) */i);
		if (!m) return left;

		str = str.slice(m[0].length);

		var right = binop();

		return {
			type: 'op',
			op: m[1].toLowerCase(),
			left: left,
			right: right
		}
	}

	/**
	 * FIELD[:VALUE]
	 */

	function field() {
		var val = true;
		var m = str.match(/^([-.\w]+)/);
		if (!m) return;

		var name = m[0];
		str = str.slice(name.length);

		var m = str.match(/^:([-*\w.]+|".*?"|'.*?'|\/(.*?)\/) */);
		if (m) {
			str = str.slice(m[0].length);
			val = m[1];
			if (numeric(val)) val = parseFloat(val);
		}

		return {
			type: 'field',
			name: name,
			value: coerce(val)
		}
	}
}
461042
function parse($str) {
		preg_match_all('/(\w+)\h*=\h*(.+?)(?=,|$)/',
			$str,$pairs,PREG_SET_ORDER);
		$out=array();
		foreach ($pairs as $pair)
			$out[$pair[1]]=trim($pair[2]);
		return $out;
	}
270551
function( str ){
      var first, last;

      // find first non-space char
      for( first = 0; first < str.length && str[first] === ' '; first++ ){}

      // find last non-space char
      for( last = str.length - 1; last > first && str[last] === ' '; last-- ){}

      return str.substring(first, last + 1);
    }
797819
function parseKeyString(str) {
      var key, match;
      var keys = [];
      while (str) {
        match = (/<\w+-.+?>|<\w+>|./).exec(str);
        if(match === null)break;
        key = match[0];
        str = str.substring(match.index + key.length);
        keys.push(key);
      }
      return keys;
    }
519977
function (str) {
    var lit = this.ast_stringify(t.stringLiteral(str));
    var ast = this.ast_buffer(lit);
    return ast;
  }
496886
function(str, start) {
    return (str.length >= start.length &&
            str.substr(0, start.length) === start);
  }
1084500
function (str) {

        if (!str || !str.length || str.length < 2) {
            return null;
        }

        var jsonStr = str.substring(1, str.length - 1);

        return JSON.parse(jsonStr);
    }
1205378
function split(str, separator) {
    separator = separator || '';
    if (_.isString(str)) {
        return str.split(separator);
    } else {
        return str;
    }
}
1154183
function(str, end) {
    return (str.length >= end.length &&
            str.substring(str.length - end.length) === end);
  }
616208
function stringify(str) {
            if (!str) {
                return str;
            }

            var newStr = '';
            for (var i = 0, l = str.length, ch; i < l; i++) {
                ch = str.charCodeAt(i);
                if (ch === 0) {
                    continue;
                }
                newStr += String.fromCharCode(ch);
            }
            return newStr;
        }
1051027
function parsePart( str ){

    if ( str ){
        return getFullLines( str ).reduce( getDict, {} );
    } else {
        return {};
    }

    function getDict( r, line ){

        if ( line.indexOf( ":" ) === -1 ){
            r[line] =           line;
        } else {
            line =              line.split( ":" );
            r[line.shift().trim()] =   line.join( ":" ).trim();
        }

        return r;
    }///
}
738231
function parse(str, callback) {
	process.nextTick(function () {
		var output = parseSync(str);
		callback(output);
	});
}
553626
function stringToBuffer (str) {
  str = cleanPath(str)
  const a = stringToStringTuples(str)
  const b = stringTuplesToTuples(a)

  return tuplesToBuffer(b)
}