code: function trimString(s) {
    let l = 0;
    let r = s.length - 1;
    while (l < s.length && s[l] === ' ') {
      l++;
    }
    while (r > l && s[r] === ' ') {
      r -= 1;
    }
    return s.substring(l, r + 1);
  }
docs: TODO: The publicly exposed parts of this should be in lib/SSCGridUtils.