## String::FromUtf8(const char *) method


从 utf8 字符串创建 [String](../)。

```cpp
static String System::String::FromUtf8(const char *utf8)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| utf8 | const char * | 指向使用 utf8 代码页编码的以 null 结尾的字符串的指针。 |

### ReturnValue

[String](../) object representing passed string.

## 另见

* Class [String](../)
* Class [String](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## String::FromUtf8(const char *, int) method


从 utf8 字符串创建 [String](../)。

```cpp
static String System::String::FromUtf8(const char *utf8, int len)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| utf8 | const char * | 指向使用 utf8 代码页编码的字符串的指针。 |
| len | int | 要处理的字符数。 |

### ReturnValue

[String](../) object representing passed string.

## 另见

* Class [String](../)
* Class [String](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## String::FromUtf8(const std::string\&) method


从 utf8 字符串创建 [String](../)。

```cpp
static String System::String::FromUtf8(const std::string &utf8)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| utf8 | const std::string\& | 指向使用 utf8 代码页编码的字符串的指针。 |

### ReturnValue

[String](../) object representing passed string.

## 另见

* Class [String](../)
* Class [String](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## String::FromUtf8(const uint8_t *) method


从 utf8 字符串创建 [String](../)。

```cpp
static String System::String::FromUtf8(const uint8_t *utf8)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| utf8 | const uint8_t * | 指向使用 utf8 代码页编码的以 null 结尾的字符串的指针。 |

### ReturnValue

[String](../) object representing passed string.

## 另见

* Class [String](../)
* Class [String](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
