<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@easyops-cn/brick-next-pipes](./brick-next-pipes.md) &gt; [substring](./brick-next-pipes.substring.md)

## substring() function

根据指定起始位置和结束位置（不包含）返回一个字符串的子串。

 String

**Signature:**

```typescript
export declare function substring(value: string, start: number, end?: number): string;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  value | string | 字符串。 |
|  start | number |  |
|  end | number | 返回的子串的结束位置。 |

**Returns:**

string

子串。

## Remarks

详见 [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/String/substring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring)

