> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/js/val/prim/str/method.md).

# String methods

[JS](/web/js.md) ⟩ [value](/web/js/val.md) ⟩ [primitive](/web/js/val/prim.md) ⟩ [String](/web/js/val/prim/str.md) ⟩ methods

{% tabs %}
{% tab title="🔴 主題" %}

* substring
  * [str.slice2()](/web/js/val/prim/str/method/str.slice2.md) - support unicode
* replace strings
  * [str.replace()](/web/js/val/prim/str/method/str.replace.md)
  * [str.replaceWhitespaces()](/web/js/val/prim/str/method/str.replacewhitespaces.md)
    {% endtab %}

{% tab title="🔸 處理字元" %}

* [str.capitalize()](/web/js/val/prim/str/method/.capitalize.md) - 第一個字母大寫
  {% endtab %}
  {% endtabs %}
