Main Content

string

Convert UTF-32 representation to string

    Description

    example

    str = string(str32) converts the UTF-32 representation str32 to string.

    Examples

    collapse all

    Convert the string "Hello! 😀" to its Unicode UTF-32 string representation using the textanalytics.unicode.UTF32 function.

    str = "Hello! 😀";
    str32 = textanalytics.unicode.UTF32(str)
    str32 = 
      UTF32 with properties:
    
        Data: [72 101 108 108 111 33 32 128512]
    
    

    Convert str32 to string using the string function.

    str = string(str32)
    str = 
    "Hello! 😀"
    

    Input Arguments

    collapse all

    UTF-32 string representation, specified as a UTF32 array.

    Output Arguments

    collapse all

    String, returned as a string array with the same size as str32.

    Introduced in R2021a