Returns the abc notation string from given input
@param {object} input - The parsed input from input file
@returns {string}
9359
function convertJsonToAbc(input) {
  var outputData = "";
  outputData += "X:1\n";
  if (typeof input.id !== 'undefined') {
    outputData += "T:"
      + input.id
      + "\n";
  }
  outputData += "M:"
    + input.attributes.time.beats
    + "/"
    + input.attributes.time["beat-type"]
    + "\n";
  outputData += "L:"
    + "1/"
    + (input.attributes.divisions * 4)
    + "\n";
  outputData += "K:"
    + getAbcKey(input.attributes.key.fifths, input.attributes.key.mode)
    + "\n";
  outputData += "K:"
    + getAbcClef(input.attributes.clef.sign)
    + "\n";

  for (var i = 0; i < input.measures.length; i++) {
    if (i % 4 === 0 && i > 0) { // 4 measures per line
      outputData += "\n";
      outputData += "|";
    }
    var measure = input.measures[i];
    if (measure.attributes.repeat.left === true || measure.attributes.repeat.left === 'true') {
      outputData += ":";
    }

    for (var j = 0; j < measure.notes.length; j++) {

      outputData += getAbcNote(measure.notes[j-1], measure.notes[j]);
    }

    if (measure.attributes.repeat.right === true || measure.attributes.repeat.right === 'true') {
      outputData += ":";
    }
    outputData += "|";

  }

  return outputData;
}
1010845
public String tag2String(String input) {
		if(pos==null||seg==null)
			return null;
		return pos.tag(input);
	}
1234405
function standardizeInput(input) {
  if ([undefined, null].indexOf(input) !== -1) {
    input = null;
  }
  else if (_.isNaN(input)) {
    input = null;
  }
  else if (_.isString(input)) {
    input = input.trim();

    // Written empty values
    if (["unspecified", "unknown", "none", "null", "empty", ""].indexOf(input.toLowerCase()) !== -1) {
      input = null;
    }
  }

  return input;
}
422860
function toCodePoints(input) {
  const codepoints = [];
  const size = input.length;

  for (let i = 0; i < size; i += 1) {
    const before = input.charCodeAt(i);

    if (before >= 0xd800 && before <= 0xdbff && size > i + 1) {
      const next = input.charCodeAt(i + 1);

      if (next >= 0xdc00 && next <= 0xdfff) {
        codepoints.push((before - 0xd800) * 0x400 + next - 0xdc00 + 0x10000);
        i += 1;
        continue;
      }
    }

    codepoints.push(before);
  }

  return codepoints;
}
467030
function splitInput(str) {
  if (str.slice(0, 3) !== '---') return;

  var matcher = /\n(\.{3}|-{3})/g;
  var metaEnd = matcher.exec(str);

  return metaEnd && [str.slice(0, metaEnd.index), str.slice(matcher.lastIndex)];
}
717958
public static String underscored(final String input) {
        if (input == null || input.length() == 0) {
            return "";
        }

        return input.trim().replaceAll("([a-z\\d])([A-Z]+)", "$1_$2").replaceAll("[-\\s]+", "_").toLowerCase();
    }
722125
public String normalize(String input) {
		char[] c = input.toCharArray();
		normalise(c);
		return new String(c);
	}
883083
function getDomainIndex(input) {
  let index = input.indexOf(':');
  ++index;
  while (input[index] === '/') {
    index++;
  }
  return index;
}
1164777
static String unescape(String input)
    {
        if (input.isEmpty())
            return input;

        String res = input.replaceAll("\\\\:", ":");
        char last = res.charAt(res.length() - 1);
        return last == '!' ? res.substring(0, res.length() - 1) : res;
    }
1024854
function( input ) {

		if ( input == null ) {

			input = this.result;

		}
		 	this.result = input;

		  this.alphaNum(this.result);

			this.halfSpace( this.result );

			this.removeArabicChar( this.result );

			return this;

		}
194932
function( signature, input, key ) {

    var check = this.sign( input, key )

    return signature.toString( 'hex' ) ===
      check.toString( 'hex' )

  }
902866
function createStrings(input) {
  return new Promise((resolve, reject) => {
    try {
      if (!input) {
        return resolve(null);
      }

      const importsString = input.imports.length ? `${input.imports.join('\n')}\n\n` : '';
      const exportsString = input.exports.length ? `${input.exports.join('\n')}\n` : '';
      const indexString = `${importsString}${exportsString}`.replace('\n\n\n', '\n\n');

      return resolve(indexString.length ? indexString : null);
    } catch (e) {
      return reject(new Error(t('STRINGS_COULD_NOT_BE_CREATED')));
    }
  });
}
192110
function ucfirst(input) {
  return isString(input) ? input.split(' ')
    .map(function (char) {
      return char.charAt(0).toUpperCase() + char.substring(1);
    }).join(' ') : input;
}
256228
function fromBytes(input){
    var output = '';
    var len = input.length;
    var i = 0;
    var b1;
    var b2;

    while (i < len)
    {
      b1 = input[i++] || 0;
      b2 = input[i++] || 0;
      output += String.fromCharCode((b2 << 8) | b1);
    }
    return output;
  }
233781
function parseInput(input) {
  var match = re.exec(input);

  if (match !== null) {
    var _match = _slicedToArray(match, 6),
        pre_keyword = _match[1],
        operator_keyword = _match[2],
        value = _match[3],
        unit = _match[4],
        post_keyword = _match[5];

    if (pre_keyword && post_keyword || pre_keyword && operator_keyword || post_keyword && operator_keyword) {
      return null;
    }

    return {
      value: sanitizeValue({
        value: value,
        operator_keyword: operator_keyword,
        post_keyword: post_keyword
      }),
      unit: unit
    };
  }

  return null;
}
1341563
function(input) {
  var code = '';

  var unparsedInput = input;
  var unparsedInputLength;
  var output;

  do {
    var section = toplevel(unparsedInput);
    unparsedInputLength = unparsedInput.length;
    if (section.zone === null) {
      output = unparsedInput;
      code += '$_write('
        + JSON.stringify(escapeCurly(output, section.escapes))
        + ');\n';
      break;
    }
    var span = unparsedInput.slice(section.zone.from + 2, section.zone.to - 2);
    var params = zoneParser(span);    // Fragment the parameters.
    var macro = params[0];

    output = unparsedInput.slice(0, section.zone.from);
    code += '$_write('
      + JSON.stringify(escapeCurly(output, section.escapes))
      + ');\n';

    // If the macro is not present, print the zone directly.
    if (macros[macro] === undefined) {
      output = unparsedInput.slice(section.zone.from, section.zone.to);
      code += '$_write('
        + JSON.stringify(escapeCurly(output, section.escapes))
        + ');\n';
      unparsedInput = unparsedInput.slice(section.zone.to);
      continue;
    }
    // If the macro is empty, this is code.
    if (macro === "") {
      code += params.slice(1).join('') + '\n';
      unparsedInput = unparsedInput.slice(section.zone.to);
      continue;
    }

    // Call the macro.
    var errmsg = JSON.stringify([
      'Template error: macro "MACRO" didn\'t work.',
      'Parameters: PARAMS',
      'Literal: LITERAL',
      'Message: MESSAGE'
    ].join('\n'))
     .replace('MACRO', '" + ' + JSON.stringify(macro) + ' + "')
     .replace('MESSAGE', '" + e.message + "')
     .replace('PARAMS', '" + ' + JSON.stringify(params.slice(1)) + ' + "')
     .replace('LITERAL', '" + $_scopestr + "');
    var macrocode = macros[macro](params.slice(1));
    code += [
      'try {',
      '  ' + macrocode,
      '} catch(e) {',
      '  try {',
      '    var $_scopestr = JSON.stringify($_scope);',
      '  } catch(e) { var $_scopestr = Object.keys($_scope).join(" "); }',
      '  throw Error (' + errmsg + ');',
      '}'
    ].join('\n');

    unparsedInput = unparsedInput.slice(section.zone.to);
  } while (section.zone.to < unparsedInputLength);

  return code;
}
812149
private function stringToUtf($input)
    {
        if (is_array($input)) {
            $temp = array();
            foreach ($input as $key => $value) {
                $temp[$this->stringToUtf($key)] = $this->stringToUtf($value);
            }
            $input = $temp;
        } elseif (is_string($input)) {
            $input = iconv('iso-8859-15', 'utf-8', $input);
        }

        return $input;
    }