class
Godot::PackedByteArray
- Godot::PackedByteArray
- Reference
- Object
Included Modules
- Enumerable(UInt8)
Defined in:
libgodot/collections.crConstructors
- .from(items : Array(UInt8)) : PackedByteArray
- .new(size : Int, initial_value : UInt8 = 0_u8)
- .new(initial_items : Array(UInt8))
- .new
Instance Method Summary
- #<<(value : UInt8) : self
- #[](index : Int) : UInt8
- #[]=(index : Int, value : UInt8) : UInt8
- #[]?(index : Int) : UInt8 | Nil
- #append(value : UInt8) : self
- #clear : Void
-
#each(&block : UInt8 -> Void) : Void
Must yield this collection's elements to the block.
-
#empty? : Bool
Returns
trueifselfdoes not contain any element. - #is_empty : Bool
- #push(value : UInt8) : self
- #resize(new_size : Int) : Void
-
#size : Int64
Returns the number of elements in the collection.
-
#to_a : Array(UInt8)
Returns an
Arraywith all the elements in the collection.
Constructor Detail
Instance Method Detail
def each(&block : UInt8 -> Void) : Void
#
Description copied from module Enumerable(UInt8)
Must yield this collection's elements to the block.
def empty? : Bool
#
Description copied from module Enumerable(UInt8)
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(UInt8)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4