xiaozi 2022-08-16 16:14:06

删除字符串中的BOM

function trimBOM(str) {
  // remove BOM if present
  if (str.charCodeAt(0) === 0xfeff) {
    str = str.substr(1);
  }
  return str;
}

评论

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-21 20:38
浙ICP备14020137号-1 $访客地图$