pub trait INSMutableString: INSString {
// Provided methods
fn m_string_with_capacity(capacity: UInt) -> NSMutableString { ... }
fn m_init_with_capacity(&mut self, capacity: UInt) -> NSMutableString
where Self: Sized { ... }
fn m_append_string<S>(&mut self, string: S)
where S: INSString { ... }
fn m_apply_transform_reverse_range_updated_range(
&mut self,
transform: NSStringTransform,
reverse: bool,
range: NSRange,
out_range: NSRange,
) -> bool { ... }
fn m_delete_characters_in_range(&mut self, range: NSRange) { ... }
fn m_insert_string_at_index<S>(&mut self, string: S, loc: UInt)
where S: INSString { ... }
fn m_replace_characters_in_range_with_string<S>(
&mut self,
range: NSRange,
string: S,
)
where S: INSString { ... }
fn m_replace_occurrences_of_string_with_string_options_range<S>(
&mut self,
target: NSString,
replacement: S,
options: NSStringCompareOptions,
search_range: NSRange,
) -> UInt
where S: INSString { ... }
fn m_set_string<S>(&mut self, string: S)
where S: INSString { ... }
}Expand description
A trait containing all the methods for NSMutableString
Provided Methods§
Sourcefn m_string_with_capacity(capacity: UInt) -> NSMutableString
fn m_string_with_capacity(capacity: UInt) -> NSMutableString
Sourcefn m_init_with_capacity(&mut self, capacity: UInt) -> NSMutableStringwhere
Self: Sized,
fn m_init_with_capacity(&mut self, capacity: UInt) -> NSMutableStringwhere
Self: Sized,
Returns an NSMutableString object initialized with initial storage for a given number of characters,
§Arguments
capacity- The number of characters to allocate space for.
Sourcefn m_append_string<S>(&mut self, string: S)where
S: INSString,
fn m_append_string<S>(&mut self, string: S)where
S: INSString,
Adds a constructed string to the receiver.
§Arguments
string- The string to append to the receiver.
Sourcefn m_apply_transform_reverse_range_updated_range(
&mut self,
transform: NSStringTransform,
reverse: bool,
range: NSRange,
out_range: NSRange,
) -> bool
fn m_apply_transform_reverse_range_updated_range( &mut self, transform: NSStringTransform, reverse: bool, range: NSRange, out_range: NSRange, ) -> bool
Transliterates the receiver by applying a specified ICU string transform.
§Arguments
transform- TheStringTransformto apply.reverse- Iftrue, the transformation is applied in reverse.range- The range of characters to apply the transformation to.out_range- The range of characters that were transformed.
§Returns
true if the transformation was successful, otherwise false.
Sourcefn m_delete_characters_in_range(&mut self, range: NSRange)
fn m_delete_characters_in_range(&mut self, range: NSRange)
Removes from the receiver the characters in a given range.
§Arguments
range- The range of characters to remove.
Sourcefn m_insert_string_at_index<S>(&mut self, string: S, loc: UInt)where
S: INSString,
fn m_insert_string_at_index<S>(&mut self, string: S, loc: UInt)where
S: INSString,
Inserts into the receiver the characters of a given string at a given location.
§Arguments
string- The string to insert into the receiver.loc- The location at which to insertstring.
Sourcefn m_replace_characters_in_range_with_string<S>(
&mut self,
range: NSRange,
string: S,
)where
S: INSString,
fn m_replace_characters_in_range_with_string<S>(
&mut self,
range: NSRange,
string: S,
)where
S: INSString,
Replaces the characters from aRange with those in string.
§Arguments
range- The range of characters to replace.string- The string to replace with.
Sourcefn m_replace_occurrences_of_string_with_string_options_range<S>(
&mut self,
target: NSString,
replacement: S,
options: NSStringCompareOptions,
search_range: NSRange,
) -> UIntwhere
S: INSString,
fn m_replace_occurrences_of_string_with_string_options_range<S>(
&mut self,
target: NSString,
replacement: S,
options: NSStringCompareOptions,
search_range: NSRange,
) -> UIntwhere
S: INSString,
Replaces all occurrences of a given string in a given range with another given string, returning the number of replacements.
Sourcefn m_set_string<S>(&mut self, string: S)where
S: INSString,
fn m_set_string<S>(&mut self, string: S)where
S: INSString,
Replaces the characters of the receiver with those in a given string.
§Arguments
string- The string to replace the characters of the receiver with. string must not benull.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.