主要内容

UTF32

Unicode utf - 32字符串表示

    描述

    32位Unicode转换格式(utf - 32)是一个固定长度的Unicode代码点编码,使用32位/代码点。

    创建

    描述

    例子

    str32= textanalytics.unicode.UTF32 (str)返回的Unicode utf - 32表示str。如果str是一个数组,然后呢str32(我)字符串的Unicode utf - 32表示吗str(我)

    输入参数

    全部展开

    输入文本,指定为字符串数组,特征向量,或单元阵列特征向量。

    例子:["的一个例子短句。”;“第二个短句。”)

    数据类型:字符串|字符|细胞

    属性

    全部展开

    utf - 32代码点,指定为一个向量的整数类型uint32

    如果输入字符串包含代理对,那么相应的代码点有不同长度的列表。

    数据类型:uint32

    对象的功能

    characterCategories Unicode字符类别
    十六进制 utf - 32表示转换为十六进制值
    字符串 utf - 32表示转换为字符串

    例子

    全部折叠

    将字符串“你好!”使用Unicode utf - 32的字符串表示textanalytics.unicode.UTF32函数。

    str =“你好!”;str32 = textanalytics.unicode.UTF32 (str)
    str32 = UTF32属性:数据:(128512 72 101 108 108 111 33 32)

    将字符串“你好!”使用Unicode utf - 32的字符串表示textanalytics.unicode.UTF32函数。

    str =“你好!”;str32 = textanalytics.unicode.UTF32 (str)
    str32 = UTF32属性:数据:(128512 72 101 108 108 111 33 32)

    Unicode字符类str32使用characterCategories函数。

    ucats = characterCategories (str32)
    ucats =1 x1单元阵列{[L L L L L P Z S]}

    Unicode字符类别“L”、“P”,“Z”,和“S”对应于“信”,“标点符号”、“分离器”,和“象征”。

    将字符串“你好!”使用Unicode utf - 32的字符串表示textanalytics.unicode.UTF32函数。

    str =“你好!”;str32 = textanalytics.unicode.UTF32 (str)
    str32 = UTF32属性:数据:(128512 72 101 108 108 111 33 32)

    Unicode字符类str32使用characterCategories函数。设置返回详细Unicode字符类“粒度”选项“详细”

    ucats = characterCategories (str32,“粒度”,“详细”)
    ucats =1 x1单元阵列{[卢会将会将阿宝z]}

    Unicode字符类别“陆”,“会”,“阿宝”,“z”和“所以”对应于“大写字母”,“小写字母”,“其他标点符号”、“空间分隔符”,和“其他符号”。

    将字符串“你好!”使用Unicode utf - 32的字符串表示textanalytics.unicode.UTF32函数。

    str =“你好!”;str32 = textanalytics.unicode.UTF32 (str)
    str32 = UTF32属性:数据:(128512 72 101 108 108 111 33 32)

    转换str32使用十六进制值十六进制函数。

    hexStr =十六进制(str32)
    hexStr = " 0048 0065 006 c 006 c 006 f 0021 0020 1 f600”

    将字符串“你好!”使用Unicode utf - 32的字符串表示textanalytics.unicode.UTF32函数。

    str =“你好!”;str32 = textanalytics.unicode.UTF32 (str)
    str32 = UTF32属性:数据:(128512 72 101 108 108 111 33 32)

    转换str32字符串使用字符串函数。

    str =字符串(str32)
    str = "你好!”

    引用

    [1]Unicode标准附件# 19 utf - 32https://www.unicode.org/reports/tr19/tr19 - 9. - html

    版本历史

    介绍了R2021a