String、模板字符串与常用文本处理 | JavaScript

本章覆盖:字符串不可变;索引与 length 的 UTF-16 code unit 语义;includes / startsWith / endsWith;slice / substring;replace / replaceAll;split / trim;template literal 与插值。

本章知识点

  • 字符串不可变
  • 索引与 length 的 UTF-16 code unit 语义
  • includes / startsWith / endsWith
  • slice / substring
  • replace / replaceAll
  • split / trim
  • template literal 与插值