SHARE
TWEET

Untitled

a guest Oct 17th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String.prototype.splitl = function(delim, limit) { // Split a string by delim into limit parts + remainder
  2.   let parts = this.split(delim)
  3.   let splits = parts.slice(0, limit)
  4.   let remainder = parts.slice(limit).join(delim)
  5.   splits.push(remainder)
  6.   return splits
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top