Comment 138 for bug 134813

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

OK then, just use this:

function offsetToWord(data, offset) {
  var m1 = data.substr(0, offset).match(/\w+$/) || "";
  var m2 = data.substr(offset).match(/^\w+/) || "";
  return m1 + m2;
}