## CharUnicodeInfo::GetDigitValue(char16_t) method


获取指定字符的数字值。

```cpp
static int System::Globalization::CharUnicodeInfo::GetDigitValue(char16_t ch)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| ch | char16_t | Unicode 字符。 |

### ReturnValue

数字值，若指定字符不是数字则返回 -1。

## 另见

* Class [CharUnicodeInfo](../)
* Namespace [System::Globalization](../../)
* Library [Aspose.Page for C++](../../../)
## CharUnicodeInfo::GetDigitValue(const String\&, int) method


获取字符串中指定索引处字符的数字值。

```cpp
static int System::Globalization::CharUnicodeInfo::GetDigitValue(const String &str, int index)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| str | const String\& | 包含 Unicode 字符的字符串。 |
| 索引 | int | Unicode 字符的索引。 |

### ReturnValue

数字值，若指定字符不是数字则返回 -1。

## 另见

* Class [String](../../../system/string/)
* Class [CharUnicodeInfo](../)
* Namespace [System::Globalization](../../)
* Library [Aspose.Page for C++](../../../)
