class Godot::PackedStringArray

Included Modules

Defined in:

libgodot/collections.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from(items : Array(String)) : PackedStringArray #

def self.new(size : Int, initial_value : String = "") #

def self.new(initial_items : Array(String)) #

def self.new #

Instance Method Detail

def <<(value : String) : self #

def [](index : Int) : String #

def []=(index : Int, value : String) : String #

def []?(index : Int) : String | Nil #

def append(value : String) : self #

def clear : Void #

def each(&block : String -> Void) : Void #
Description copied from module Enumerable(String)

Must yield this collection's elements to the block.


def empty? : Bool #
Description copied from module Enumerable(String)

Returns true if self does not contain any element.

([] of Int32).empty? # => true
([1]).empty?         # => false
[nil, false].empty?  # => false
  • #present? returns the inverse.

def is_empty : Bool #

def push(value : String) : self #

def resize(new_size : Int) : Void #

def size : Int64 #
Description copied from module Enumerable(String)

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4

def to_a : Array(String) #
Description copied from module Enumerable(String)

Returns an Array with all the elements in the collection.

(1..5).to_a # => [1, 2, 3, 4, 5]