---
title: Find
description: "查找子串在当前字符串中的位置。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00286.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00286.html
indexId: f1bc0171e26023ae65602912ae77af1bed268bcff4023e1bf6eb8eebf6e3fe2e78
---
# Find

#### 函数功能

查找子串在当前字符串中的位置。


#### 函数原型

```
size_t Find(const AscendString &ascend_string) const
```


#### 约束说明

无。


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| ascend\_string | 输入 | 要查找的子串。 |


#### 返回值

子串的起始位置。
