---
title: GetLength
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/udfrefc_23_00021.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/udfrefc_23_00021.html
indexId: e56f06189cc49a4f144e6dfedef77b23e42a3f4dc781082e2250b326ee58925171
---
# GetLength

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

获取字符串的长度。


#### 函数原型

```
size_t GetLength() const
```


#### 参数说明

无


#### 返回值

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| \- | size\_t | 字符串长度。 |


#### 异常处理

无。


#### 约束说明

无。
