> For the complete documentation index, see [llms.txt](https://denglj.gitbook.io/essential-go/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://denglj.gitbook.io/essential-go/05-strings.md).

# 05 字符串(String)

- [在字符串中查找另一字符串](https://denglj.gitbook.io/essential-go/05-strings/zai-zi-fu-chuan-zhong-cha-zhao-ling-yi-zi-fu-chuan.md)
- [字符串比较](https://denglj.gitbook.io/essential-go/05-strings/zi-fu-chuan-bi-jiao.md)
- [大小写转换](https://denglj.gitbook.io/essential-go/05-strings/da-xiao-xie-zhuan-huan.md)
- [字符串转整型和浮点型](https://denglj.gitbook.io/essential-go/05-strings/zi-fu-chuan-zhuan-zheng-xing-he-fu-dian-xing.md)
- [字符串修剪(删除字符或子串)](https://denglj.gitbook.io/essential-go/05-strings/zi-fu-chuan-xiu-jian-shan-chu-zi-fu-huo-zi-chuan.md)
- [字符串文本替换](https://denglj.gitbook.io/essential-go/05-strings/zi-fu-chuan-wen-ben-ti-huan.md)
- [字符串分割和连接](https://denglj.gitbook.io/essential-go/05-strings/zi-fu-chuan-fen-ge-he-lian-jie.md)
- [文本格式化](https://denglj.gitbook.io/essential-go/05-strings/wen-ben-ge-shi-hua.md)
- [文本解析](https://denglj.gitbook.io/essential-go/05-strings/wen-ben-jie-xi.md)
- [逐行读取文件](https://denglj.gitbook.io/essential-go/05-strings/zhu-hang-du-qu-wen-jian.md)
- [规范化换行符](https://denglj.gitbook.io/essential-go/05-strings/gui-fan-hua-huan-hang-fu.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://denglj.gitbook.io/essential-go/05-strings.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.
