Click or drag to resize

StringExtensionsGetStringFromASCII Method

Converts the given byte array of ASCII encoded text to a string. Faster alternative to GetStringFromUTF8(Byte) if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use GetStringFromUTF8(Byte).

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

Parameters

bytes
Type: SystemByte
A byte array of ASCII characters (on the range of 0-127).

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