Ad
Strings
Parsing

Given a string, strip the given beginning and ending chars off, and return the resulting substring.

function stripEnds(s, prefix, suffix) {
  return s.replace(prefix, '').replace(suffix, '');
}