dist/autocomplete.js
function parseInput(str, idx) {
  var raw = String(str || '');
  var sliced = raw.slice(0, idx);
  var sections = sliced.split('|');
  var prefix = sections.slice(0, sections.length - 1) || [];
  prefix.push('');
  prefix = prefix.join('|');
  var suffix = getSuffix(raw.slice(idx));
  var context = sections[sections.length - 1];
  return {
    raw: raw,
    prefix: prefix,
    suffix: suffix,
    context: context
  };
}
function parseInput(str, idx) {
  var raw = String(str || '');
  var sliced = raw.slice(0, idx);
  var sections = sliced.split('|');
  var prefix = sections.slice(0, sections.length - 1) || [];
  prefix.push('');
  prefix = prefix.join('|');
  var suffix = getSuffix(raw.slice(idx));
  var context = sections[sections.length - 1];
  return {
    raw: raw,
    prefix: prefix,
    suffix: suffix,
    context: context
  };
}
function parseInput ( str , idx ) { var raw = String ( str || '' ) ; var sliced = raw . slice ( 0 , idx ) ; var sections = sliced . split ( '|' ) ; var prefix = sections . slice ( 0 , sections . length - 1 ) || [ ] ; prefix . push ( '' ) ; prefix = prefix . join ( '|' ) ; var suffix = getSuffix ( raw . slice ( idx ) ) ; var context = sections [ sections . length - 1 ] ; return { raw : raw , prefix : prefix , suffix : suffix , context : context } ; }
Takes the user's current prompt
string and breaks it into its
integral parts for analysis and
modification.

@param {String} str
@param {Integer} idx
@return {Object}
@api private
Takes the user s current prompt string and breaks it into its integral parts for analysis and modification .