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 from copying a slice.

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 contents of self as a UTF-16 string slice, or None if the internal storage of self does not allow this to be returned efficiently.

See as_str for the UTF-8 equivalent.

Safety

You must ensure that self is not mutated during the lifetime of the returned slice.

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

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Returns the Objective-C class that can be used to instantiate a new instance of Self. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Formats the value using the given formatter. Read more

Increments the object’s retain count and returns a smart pointer that automatically calls release on Drop. Read more

Decrements the object’s retain count. Read more

Casts self into a type-erased Objective-C object.

Returns the class that this object is an instance of.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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 tests greater than or equal to (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 tests greater than or equal to (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 tests greater than or equal to (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 tests greater than or equal to (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 tests greater than or equal to (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 tests greater than or equal to (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 tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.