Struct gdnative::StringArray [−][src]
pub struct StringArray(_);
A vector of GodotString
that uses Godot's pool allocator.
Methods
impl StringArray
[src]
impl StringArray
pub fn new() -> Self
[src]
pub fn new() -> Self
Creates an empty StringArray
.
pub fn from_variant_array(array: &VariantArray) -> Self
[src]
pub fn from_variant_array(array: &VariantArray) -> Self
Creates an array by trying to convert each variant.
See Variant::to_string_array
.
pub fn push(&mut self, s: &GodotString)
[src]
pub fn push(&mut self, s: &GodotString)
Appends an element at the end of the array.
pub fn push_string_array(&mut self, strings: &StringArray)
[src]
pub fn push_string_array(&mut self, strings: &StringArray)
Appends a StringArray
at the end of this array.
pub fn insert(&mut self, offset: i32, string: &GodotString) -> bool
[src]
pub fn insert(&mut self, offset: i32, string: &GodotString) -> bool
Insert a new GodotString
at a given position in the array.
pub fn invert(&mut self)
[src]
pub fn invert(&mut self)
Inverts the order of the elements in the array.
pub fn remove(&mut self, idx: i32)
[src]
pub fn remove(&mut self, idx: i32)
Removes an element at the given offset.
pub fn resize(&mut self, size: i32)
[src]
pub fn resize(&mut self, size: i32)
Changes the size of the array, possibly removing elements or pushing default values.
pub fn get(&self, idx: i32) -> GodotString
[src]
pub fn get(&self, idx: i32) -> GodotString
Returns a copy of the element at the given offset.
pub fn set(&mut self, idx: i32, string: &GodotString)
[src]
pub fn set(&mut self, idx: i32, string: &GodotString)
Sets the value of the element at the given offset.
pub fn len(&self) -> i32
[src]
pub fn len(&self) -> i32
Returns the number of elements in the array.
pub fn new_ref(&self) -> StringArray
[src]
pub fn new_ref(&self) -> StringArray
Trait Implementations
impl Drop for StringArray
[src]
impl Drop for StringArray
impl Default for StringArray
[src]
impl Default for StringArray
impl GodotType for StringArray
[src]
impl GodotType for StringArray
fn to_variant(&self) -> Variant
[src]
fn to_variant(&self) -> Variant
fn from_variant(variant: &Variant) -> Option<Self>
[src]
fn from_variant(variant: &Variant) -> Option<Self>
fn from_sys_variant(variant: &godot_variant) -> Option<Self>
[src]
fn from_sys_variant(variant: &godot_variant) -> Option<Self>
Auto Trait Implementations
impl Send for StringArray
impl Send for StringArray
impl Sync for StringArray
impl Sync for StringArray