Click or drag to resize

StringExtensionsGetStringFromUTF8 Method

Converts the given byte array of UTF-8 encoded text to a string. Slower than GetStringFromASCII(Byte) but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static string GetStringFromUTF8(
	this byte[] bytes
)

Parameters

bytes
Type: SystemByte
A byte array of UTF-8 characters (a character may take up multiple bytes).

Return Value

Type: String
A string created from the bytes.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also