Struct gdnative_visual_script::common::StringArray [−]
pub struct StringArray(_);
A vector of GodotString that uses Godot's pool allocator.
Methods
impl StringArray
impl StringArraypub fn new() -> StringArray
pub fn new() -> StringArrayCreates an empty StringArray.
pub fn from_variant_array(array: &VariantArray) -> StringArray
pub fn from_variant_array(array: &VariantArray) -> StringArrayCreates 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) -> boolInsert 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) -> GodotStringReturns 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) -> i32Returns the number of elements in the array.
pub fn new_ref(&self) -> StringArray
pub fn new_ref(&self) -> StringArrayTrait Implementations
impl ToVariant for StringArray
impl ToVariant for StringArrayfn to_variant(&self) -> Variant
fn to_variant(&self) -> Variantfn from_variant(variant: &Variant) -> Option<StringArray>
fn from_variant(variant: &Variant) -> Option<StringArray>impl Default for StringArray
impl Default for StringArrayfn default() -> StringArray
fn default() -> StringArrayReturns the "default value" for a type. Read more
impl Drop for StringArray
impl Drop for StringArrayAuto Trait Implementations
impl Send for StringArray
impl Send for StringArrayimpl Sync for StringArray
impl Sync for StringArray