Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

PackedStringArray

A packed array of Strings.

Description

An array specifically designed to hold Strings. Packs data tightly, so it saves memory for large array sizes.

If you want to join the strings in the array, use String.join.

var string_array = PackedStringArray(["hello", "world"])
var string = " ".join(string_array)
print(string) # "hello world"

Примечание

There are notable differences when using this API with C#. See API различия C# и GDScript for more information.

Tutorials

Constructors

PackedStringArray

PackedStringArray ( )

PackedStringArray

PackedStringArray ( PackedStringArray from )

PackedStringArray

PackedStringArray ( Array from )

Methods

bool

append ( String value )

void

append_array ( PackedStringArray array )

int

bsearch ( String value, bool before=true )

void

clear ( )

int

count ( String value ) const

PackedStringArray

duplicate ( )

void

fill (