Struct gdnative_physics::common::StringArray [−]
pub struct StringArray(_);
A vector of GodotString
that uses Godot's pool allocator.
Methods
impl StringArray
impl StringArray
pub fn new() -> StringArray
pub fn new() -> StringArray
Creates an empty StringArray
.
pub fn from_variant_array(array: &VariantArray) -> StringArray
pub fn from_variant_array(array: &VariantArray) -> StringArray
Creates an array by trying to convert each variant.
See Variant::to_string_array
.
pub fn push(&mut self, s: &GodotString)
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)
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
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)
pub fn invert(&mut self)
Inverts the order of the elements in the array.
pub fn remove(&mut self, idx: i32)
pub fn remove(&mut self, idx: i32)
Removes an element at the given offset.
pub fn resize(&mut self, size: i32)
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
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)
pub fn set(&mut self, idx: i32, string: &GodotString)
Sets the value of the element at the given offset.
pub fn len(&self) -> i32
pub fn len(&self) -> i32
Returns the number of elements in the array.
pub fn new_ref(&self) -> StringArray
pub fn new_ref(&self) -> StringArray
Trait Implementations
impl ToVariant for StringArray
impl ToVariant for StringArray
fn to_variant(&self) -> Variant
fn to_variant(&self) -> Variant
fn from_variant(variant: &Variant) -> Option<StringArray>
fn from_variant(variant: &Variant) -> Option<StringArray>
impl Default for StringArray
impl Default for StringArray
fn default() -> StringArray
fn default() -> StringArray
Returns the "default value" for a type. Read more
impl Drop for StringArray
impl Drop for StringArray
Auto Trait Implementations
impl Send for StringArray
impl Send for StringArray
impl Sync for StringArray
impl Sync for StringArray