pub struct GodotString(/* private fields */);
Expand description
Godot’s reference-counted string type.
Implementations§
Source§impl GodotString
impl GodotString
pub fn new() -> GodotString
pub fn from_str<S>(s: S) -> GodotString
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_numeric(&self) -> bool
pub fn is_valid_float(&self) -> bool
pub fn is_valid_html_color(&self) -> bool
pub fn is_valid_identifier(&self) -> bool
pub fn is_valid_integer(&self) -> bool
pub fn is_valid_ip_address(&self) -> bool
pub fn is_resource_file(&self) -> bool
pub fn is_absolute_path(&self) -> bool
pub fn is_relative_path(&self) -> bool
pub fn to_f32(&self) -> f32
pub fn to_f64(&self) -> f64
pub fn to_i32(&self) -> i32
pub fn u32_hash(&self) -> u32
pub fn u64_hash(&self) -> u64
pub fn hex_to_int(&self) -> i32
pub fn hex_to_int_without_prefix(&self) -> i32
pub fn camelcase_to_underscore(&self) -> GodotString
pub fn camelcase_to_underscore_lowercased(&self) -> GodotString
pub fn capitalize(&self) -> GodotString
pub fn to_lowercase(&self) -> GodotString
pub fn to_uppercase(&self) -> GodotString
pub fn get_file(&self) -> GodotString
pub fn get_base_dir(&self) -> GodotString
pub fn simplify_path(&self) -> GodotString
pub fn sha256_text(&self) -> GodotString
pub fn md5_text(&self) -> GodotString
pub fn c_escape(&self) -> GodotString
pub fn c_escape_multiline(&self) -> GodotString
pub fn c_unescape(&self) -> GodotString
pub fn http_escape(&self) -> GodotString
pub fn http_unescape(&self) -> GodotString
pub fn json_escape(&self) -> GodotString
pub fn xml_escape(&self) -> GodotString
pub fn xml_escape_with_quotes(&self) -> GodotString
pub fn xml_unescape(&self) -> GodotString
pub fn percent_decode(&self) -> GodotString
pub fn percent_encode(&self) -> GodotString
pub fn is_valid_hex_number(&self, with_prefix: bool) -> bool
pub fn begins_with(&self, s: &GodotString) -> bool
pub fn ends_with(&self, s: &GodotString) -> bool
pub fn begins_with_c_str(&self, s: &CStr) -> bool
pub fn sub_string(&self, range: Range<usize>) -> GodotString
pub fn to_string(&self) -> String
pub fn find(&self, what: &GodotString) -> i32
pub fn find_from(&self, what: &GodotString, from: i32) -> i32
pub fn find_last(&self, what: &GodotString) -> i32
Sourcepub fn forget(self) -> godot_string
pub fn forget(self) -> godot_string
Returns the internal ffi representation of the string and consumes the rust object without running the destructor.
This should be only used when certain that the receiving side is responsible for running the destructor for the object, otherwise it is leaked.
Sourcepub fn to_sys(&self) -> godot_string
pub fn to_sys(&self) -> godot_string
Returns a copy of the internal ffi representation of the string.
The string remains owned by the rust wrapper and the receiver of the ffi representation should not run its destructor.
pub fn new_ref(&self) -> GodotString
Trait Implementations§
Source§impl Debug for GodotString
impl Debug for GodotString
Source§impl Default for GodotString
impl Default for GodotString
Source§fn default() -> GodotString
fn default() -> GodotString
Returns the “default value” for a type. Read more
Source§impl Drop for GodotString
impl Drop for GodotString
Source§impl<'l> From<&'l GodotString> for Variant
impl<'l> From<&'l GodotString> for Variant
Source§fn from(val: &'l GodotString) -> Variant
fn from(val: &'l GodotString) -> Variant
Converts to this type from the input type.
Source§impl From<GodotString> for NodePath
impl From<GodotString> for NodePath
Source§fn from(s: GodotString) -> NodePath
fn from(s: GodotString) -> NodePath
Converts to this type from the input type.
Source§impl<S> From<S> for GodotString
impl<S> From<S> for GodotString
Source§fn from(s: S) -> GodotString
fn from(s: S) -> GodotString
Converts to this type from the input type.
Source§impl Into<GodotString> for NodePath
impl Into<GodotString> for NodePath
Source§fn into(self) -> GodotString
fn into(self) -> GodotString
Converts this type into the (usually inferred) input type.
Source§impl PartialEq for GodotString
impl PartialEq for GodotString
Source§impl ToVariant for GodotString
impl ToVariant for GodotString
fn to_variant(&self) -> Variant
fn from_variant(variant: &Variant) -> Option<GodotString>
impl Eq for GodotString
Auto Trait Implementations§
impl Freeze for GodotString
impl RefUnwindSafe for GodotString
impl Send for GodotString
impl Sync for GodotString
impl Unpin for GodotString
impl UnwindSafe for GodotString
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more