INSMutableString

Trait INSMutableString 

Source
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§

Source

fn m_string_with_capacity(capacity: UInt) -> NSMutableString

Returns an empty NSMutableString object with initial storage for a given number of characters.

§Arguments
  • capacity - The number of characters to allocate space for.
§Returns

An empty NSMutableString object with initial storage for a given number of characters.

Source

fn m_init_with_capacity(&mut self, capacity: UInt) -> NSMutableString
where 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.
Source

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.
Source

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 - The StringTransform to apply.
  • reverse - If true, 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.

Source

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.
Source

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 insert string.
Source

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.
Source

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,

Replaces all occurrences of a given string in a given range with another given string, returning the number of replacements.

Source

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 be null.

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.

Implementors§