> For the complete documentation index, see [llms.txt](https://hao-fu-1.gitbook.io/oj/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hao-fu-1.gitbook.io/oj/string.md).

# String

- [Repeated String Match](https://hao-fu-1.gitbook.io/oj/string/repeated-string-match.md)
- [13. Roman to Integer](https://hao-fu-1.gitbook.io/oj/string/roman-to-integer.md): https://leetcode.com/problems/roman-to-integer/description/
- [String to Integer (atoi)](https://hao-fu-1.gitbook.io/oj/string/string-to-integer-atoi.md)
- [1451. Rearrange Words in a Sentence](https://hao-fu-1.gitbook.io/oj/string/1451.-rearrange-words-in-a-sentence.md): https://leetcode.com/problems/rearrange-words-in-a-sentence/
- [Judge Route Circle](https://hao-fu-1.gitbook.io/oj/string/judge-route-circle.md)
- [Remove Comments](https://hao-fu-1.gitbook.io/oj/string/remove-comments.md)
- [Count and Say](https://hao-fu-1.gitbook.io/oj/string/count-and-say.md)
- [Sentence Screen Fitting](https://hao-fu-1.gitbook.io/oj/string/sentence-screen-fitting.md)
- [Encode and Decode Strings](https://hao-fu-1.gitbook.io/oj/string/encode-and-decode-strings.md)
- [Add Bold Tag in String](https://hao-fu-1.gitbook.io/oj/string/add-bold-tag-in-string.md)
- [Group Shifted Strings](https://hao-fu-1.gitbook.io/oj/string/group-shifted-strings.md)
- [Valid Word Square](https://hao-fu-1.gitbook.io/oj/string/valid-word-square.md): https://leetcode.com/problems/valid-word-square/description/
- [794. Valid Tic-Tac-Toe State](https://hao-fu-1.gitbook.io/oj/string/794.-valid-tic-tac-toe-state.md): https://leetcode.com/problems/valid-tic-tac-toe-state/
- [348. Design Tic-Tac-Toe](https://hao-fu-1.gitbook.io/oj/string/348.-design-tic-tac-toe.md)
- [Valid Number](https://hao-fu-1.gitbook.io/oj/string/valid-number.md): https://leetcode.com/problems/valid-number/description/
- [Read N Characters Given Read4](https://hao-fu-1.gitbook.io/oj/string/read-n-characters-given-read4.md): https://leetcode.com/problems/read-n-characters-given-read4/description/
- [Read N Characters Given Read4 II - Call multiple times](https://hao-fu-1.gitbook.io/oj/string/read-n-characters-given-read4/read-n-characters-given-read4-ii-call-multiple-times.md): https://leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times/description/ https://www.lintcode.com/problem/read-n-characters-given-read4-ii-call-multiple-times/description
- [One Edit Distance](https://hao-fu-1.gitbook.io/oj/string/one-edit-distance.md)
- [Restore IP Addresses](https://hao-fu-1.gitbook.io/oj/string/restore-ip-addresses.md)
- [468. Validate IP Address](https://hao-fu-1.gitbook.io/oj/string/468.-validate-ip-address.md): https://leetcode.com/problems/validate-ip-address/
- [440. K-th Smallest in Lexicographical Order](https://hao-fu-1.gitbook.io/oj/string/440.-k-th-smallest-in-lexicographical-order.md): https://leetcode.com/problems/k-th-smallest-in-lexicographical-order/
- [Bold Words in String](https://hao-fu-1.gitbook.io/oj/string/bold-words-in-string.md)
- [1417. Reformat The String](https://hao-fu-1.gitbook.io/oj/string/1417.-reformat-the-string.md): https://leetcode.com/problems/reformat-the-string/
- [824. Goat Latin](https://hao-fu-1.gitbook.io/oj/string/824.-goat-latin.md): https://leetcode.com/problems/goat-latin/
- [License Key Formatting](https://hao-fu-1.gitbook.io/oj/string/license-key-formatting.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hao-fu-1.gitbook.io/oj/string.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
