Struct fruity__bbqsrc::foundation::NSMutableString [−][src]
#[repr(C)]pub struct NSMutableString<'data>(_);
Expand description
A dynamic plain-text Unicode string object.
See documentation.
Implementations
Creates a mutable string object without copying a slice.
Safety
The returned string object or its clones must not outlive the referenced string slice.
Methods from Deref<Target = NSString<'data>>
Returns a copy of this object using
NSCopying
.
See documentation.
Returns a copy of this object using
NSMutableCopying
.
See documentation.
Returns a null-terminated UTF-8 representation of self
, or null
if the internal storage of self
does not allow this to be returned
efficiently.
Unlike to_utf8_ptr
, this does not allocate
and construct a new UTF-8 C string if self
does not represent one.
This is retrieved using
CFStringGetCStringPtr
and
kCFStringEncodingUTF8
.
Returns a null-terminated UTF-8 representation of self
.
This C string is a pointer to a structure inside self
,
which may have a lifetime shorter than the string object and will
certainly not have a longer lifetime. Therefore, you should copy the C
string if it needs to be stored outside of the memory context in which
you use this property.
This is retrieved using
-[NSString UTF8String]
.
Returns the contents of self
as a native UTF-8 string slice, or None
if the internal storage of self
does not allow this to be returned
efficiently.
Unlike to_str
, this does not allocate and
construct a new UTF-8 C string if self
does not represent one.
Safety
You must ensure that self
is not mutated during the lifetime of the
returned string slice.
Returns the contents of self
as a native UTF-8 string slice.
This internally uses to_utf8_ptr
. See its
documentation for details.
Safety
The lifetime of the returned string slice may be shorter than this
object. Therefore, long use cases should copy the bytes of the returned
string slice or use to_string
.
Returns the contents of self
as a native UTF-8 string slice ending
with a 0 byte, or None
if the internal storage of self
does not
allow this to be returned efficiently.
Unlike to_str_with_nul
, this does not
allocate and construct a new UTF-8 C string if self
does not represent
one.
Safety
You must ensure that self
is not mutated during the lifetime of the
returned string slice.
Returns the contents of self
as a native UTF-8 string slice ending
with a 0 byte.
This internally uses to_utf8_ptr
. See its
documentation for details.
Safety
The lifetime of the returned string slice may be shorter than this
object. Therefore, long use cases should copy the bytes of the returned
string slice or use to_string_with_nul
.
Returns the contents of self
as a native UTF-8 string buffer.
This internally uses to_utf8_ptr
. See its
documentation for details.
Performance Considerations
Because of how
-[NSString UTF8String]
works, this method will likely allocate twice as much memory needed for
the length of the resulting buffer. If your use case is short-lived
enough, consider using to_str
to save memory and time.
Returns the contents of self
as a native UTF-8 string buffer ending
with a 0 byte.
This internally uses to_utf8_ptr
. See its
documentation for details.
Performance Considerations
Because of how
-[NSString UTF8String]
works, this method will likely allocate twice as much memory needed for
the length of the resulting buffer. If your use case is short-lived
enough, consider using to_str_with_nul
to
save memory and time.
Returns a pointer to the UTF-16 representation of self
, or null if the
internal storage of self
does not allow this to be returned
efficiently.
This is retrieved using
CFStringGetCharactersPtr
See as_utf8_ptr
for the UTF-8 equivalent.
Returns the number of UTF-16 code units in self
.
See documentation.
Returns a selector with self
as its name.
If self
cannot be converted to UTF-8 (this should be only due to
insufficient memory), this returns None
.
See documentation.
Compares the string and a given string using no options.
See documentation.
Compares the string and a given string using a localized comparison.
See documentation.
Compares the string with a given string using NSCaseInsensitiveSearch
.
See documentation.
Compares the string with a given string using a case-insensitive, localized, comparison.
See documentation.
Compares strings as sorted by the Finder.
This method should be used whenever file names or other strings are presented in lists and tables where Finder-like sorting is appropriate. The exact sorting behavior of this method is different under different locales and may be changed in future releases. This method uses the current locale.
See documentation.
Returns true
if the given string matches the beginning characters of
self
.
See documentation.
Returns true
if the given string matches the ending characters of this
string.
See documentation.
Trait Implementations
Casts self
into a type-erased Objective-C object.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<'data> RefUnwindSafe for NSMutableString<'data>
impl<'data> Send for NSMutableString<'data>
impl<'data> Sync for NSMutableString<'data>
impl<'data> Unpin for NSMutableString<'data>
impl<'data> UnwindSafe for NSMutableString<'data>