class
Godot::PackedStringArray
- Godot::PackedStringArray
- Reference
- Object
Included Modules
- Enumerable(String)
Defined in:
libgodot/collections.crlibgodot/variant.cr
Constructors
- .from(items : Array(String)) : PackedStringArray
- .from_bridge_payload(payload_ptr : Pointer(Void)) : PackedStringArray
- .from_raw(data_ptr : Pointer(Void), count : Int64) : PackedStringArray
- .new(size : Int, initial_value : String = "")
- .new(initial_items : Array(String))
- .new
Instance Method Summary
- #<<(value : String) : self
- #==(other : PackedStringArray) : Bool
- #[](index : Int) : String
- #[]=(index : Int, value : String) : String
- #[]?(index : Int) : String | Nil
- #append(value : String) : self
- #append_array(other : PackedStringArray | Array(String)) : self
- #clear : Void
- #clone : PackedStringArray
- #count(value : String) : Int64
- #cstr_array_ptr : Pointer(Pointer(UInt8))
-
#dup : PackedStringArray
Returns a shallow copy of this object.
- #duplicate : PackedStringArray
-
#each(& : String -> ) : Void
Must yield this collection's elements to the block.
-
#empty? : Bool
Returns
trueifselfdoes not contain any element. - #fill(value : String) : self
- #find(value : String, from : Int = 0) : Int64
- #has(value : String) : Bool
- #insert(index : Int, value : String) : self
- #is_empty : Bool
- #push(value : String) : self
- #push_back(value : String) : self
- #remove_at(index : Int) : String
- #resize(new_size : Int) : Void
- #reverse : self
- #reverse! : self
-
#size : Int64
Returns the number of elements in the collection.
- #slice(begin_idx : Int, end_idx : Int = @store.size) : PackedStringArray
-
#to_a : Array(String)
Returns an
Arraywith all the elements in the collection. - #to_unsafe : Pointer(String)
- #write_bridge_payload(ret_ptr : Pointer(Void)) : Void
Instance methods inherited from class Object
try?(&)try? try?
Constructor Detail
Instance Method Detail
def dup : PackedStringArray
#
Description copied from class Reference
Returns a shallow copy of this object.
This allocates a new object and copies the contents of
self into it.
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 size : Int64
#
Description copied from module Enumerable(String)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4