> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xray.cool/llms.txt
> Use this file to discover all available pages before exploring further.

# urlencodeall

> `urlencodeall`函数主要是用来将字符串或 bytes 进行 urlencode 编码, 结果为全字符编码

## 函数原型

`func urlencodeall(v1 string/bytes) string`

### 参数介绍

| 参数名称 | 参数介绍  |
| ---- | ----- |
| v1   | 待转换数据 |

## 举例

| 待转换数据                       | 转换语句                                      | 输出结果                                                                 |
| --------------------------- | ----------------------------------------- | -------------------------------------------------------------------- |
| `http://example.com?a=b`    | `urlencodeall("http://example.com?a=b")`  | `%68%74%74%70%3A%2F%2F%65%78%61%6D%70%6C%65%2E%63%6F%6D%3F%61%3D%62` |
| `b"http://example.com?a=b"` | `urlencodeall(b"http://example.com?a=b")` | `%68%74%74%70%3A%2F%2F%65%78%61%6D%70%6C%65%2E%63%6F%6D%3F%61%3D%62` |
