JAVASCRIPT   5

ltrim.js

Guest on 23rd August 2021 04:48:28 PM

  1. /**<dependency>is</dependency>**/
  2. function ltrim(str,charlist)
  3. {
  4.     if (charlist === undefined){
  5.         charlist = "\\s";
  6.     }
  7.     if(isString(str))
  8.     return str.replace(new RegExp("^[" + charlist + "]+"), "");
  9.     return str;
  10. };

Raw Paste


Login or Register to edit or fork this paste. It's free.