pub struct String<const N: usize>(/* private fields */);
Available on crate feature
godot
only.Expand description
A built-in type for strings.
Implementations§
Source§impl<const N: usize> String<N>
impl<const N: usize> String<N>
Sourcepub fn chars(&self) -> impl Iterator<Item = char> + '_
pub fn chars(&self) -> impl Iterator<Item = char> + '_
Returns an iterator over the characters in this string.
Sourcepub fn to_array_string<const UTF8_SIZE: usize>(&self) -> ArrayString<UTF8_SIZE>
pub fn to_array_string<const UTF8_SIZE: usize>(&self) -> ArrayString<UTF8_SIZE>
Converts this string to an ArrayString
. If the string is too long to
fit in the array, the excess characters are truncated.
Sourcepub fn matches_str(&self, text: &str) -> bool
pub fn matches_str(&self, text: &str) -> bool
Checks if this string matches the given string.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for String<N>
impl<const N: usize> RefUnwindSafe for String<N>
impl<const N: usize> Send for String<N>
impl<const N: usize> Sync for String<N>
impl<const N: usize> Unpin for String<N>
impl<const N: usize> UnwindSafe for String<N>
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