Answers for "how to remove whitespace only from first position of string js"

0

how to remove whitespace only from first position of string js

function ltrim(str) {
  if(!str) return str;
  return str.replace(/^\s+/g, '');
}
Posted by: Guest on February-03-2021

Code answers related to "how to remove whitespace only from first position of string js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language