js字符串前后空格清除

326 阅读1分钟
export const Trim = (str) => {
  return str.replace(/(^\s*)|(\s*$)/g, "");
};