#[repr(C)]pub struct CFString(/* private fields */);
Expand description
A reference to a CFString object.
Implementations§
Source§impl CFString
impl CFString
Sourcepub fn with_str(s: &str) -> Self
pub fn with_str(s: &str) -> Self
Creates a new CFStringRef
Sourcepub unsafe fn create_array_by_separating_strings(
alloc: CFAllocatorRef,
string: CFStringRef,
separator: CFStringRef,
) -> CFArray
pub unsafe fn create_array_by_separating_strings( alloc: CFAllocatorRef, string: CFStringRef, separator: CFStringRef, ) -> CFArray
Creates an array of CFString objects from a single CFString object.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_by_combining_strings(
alloc: CFAllocatorRef,
array: CFArrayRef,
separator: CFStringRef,
) -> CFString
pub unsafe fn create_by_combining_strings( alloc: CFAllocatorRef, array: CFArrayRef, separator: CFStringRef, ) -> CFString
Creates a single string from the individual CFString objects that comprise the elements of an array.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_copy(
alloc: CFAllocatorRef,
string: CFStringRef,
) -> CFString
pub unsafe fn create_copy( alloc: CFAllocatorRef, string: CFStringRef, ) -> CFString
Sourcepub unsafe fn create_from_external_representation(
alloc: CFAllocatorRef,
data: CFDataRef,
encoding: CFStringEncoding,
) -> CFString
pub unsafe fn create_from_external_representation( alloc: CFAllocatorRef, data: CFDataRef, encoding: CFStringEncoding, ) -> CFString
Creates a string from its “external representation.”
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_with_bytes(
alloc: CFAllocatorRef,
bytes: *const UInt8,
num_bytes: CFIndex,
encoding: CFStringEncoding,
is_external_representation: bool,
) -> Self
pub unsafe fn create_with_bytes( alloc: CFAllocatorRef, bytes: *const UInt8, num_bytes: CFIndex, encoding: CFStringEncoding, is_external_representation: bool, ) -> Self
Creates a string from a buffer containing characters in a specified encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_with_bytes_no_copy(
alloc: CFAllocatorRef,
bytes: *const UInt8,
num_bytes: CFIndex,
encoding: CFStringEncoding,
is_external_representation: Boolean,
contents_deallocator: CFAllocatorRef,
) -> CFString
pub unsafe fn create_with_bytes_no_copy( alloc: CFAllocatorRef, bytes: *const UInt8, num_bytes: CFIndex, encoding: CFStringEncoding, is_external_representation: Boolean, contents_deallocator: CFAllocatorRef, ) -> CFString
Creates a string from a buffer, containing characters in a specified encoding, that might serve as the backing store for the new string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_with_characters(
alloc: CFAllocatorRef,
chars: *const UniChar,
num_chars: CFIndex,
) -> CFString
pub unsafe fn create_with_characters( alloc: CFAllocatorRef, chars: *const UniChar, num_chars: CFIndex, ) -> CFString
Creates a string from a buffer of Unicode characters.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_with_characters_no_copy(
alloc: CFAllocatorRef,
chars: *const UniChar,
num_chars: CFIndex,
contents_deallocator: CFAllocatorRef,
) -> CFString
pub unsafe fn create_with_characters_no_copy( alloc: CFAllocatorRef, chars: *const UniChar, num_chars: CFIndex, contents_deallocator: CFAllocatorRef, ) -> CFString
Creates a string from a buffer of Unicode characters that might serve as the backing store for the object.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_with_c_string(
alloc: CFAllocatorRef,
c_str: *const c_char,
encoding: CFStringEncoding,
) -> CFString
pub unsafe fn create_with_c_string( alloc: CFAllocatorRef, c_str: *const c_char, encoding: CFStringEncoding, ) -> CFString
Sourcepub unsafe fn create_with_c_string_no_copy(
alloc: CFAllocatorRef,
c_str: *const c_char,
encoding: CFStringEncoding,
contents_deallocator: CFAllocatorRef,
) -> CFString
pub unsafe fn create_with_c_string_no_copy( alloc: CFAllocatorRef, c_str: *const c_char, encoding: CFStringEncoding, contents_deallocator: CFAllocatorRef, ) -> CFString
Creates a CFString object from an external C string buffer that might serve as the backing store for the object.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_with_format_and_arguments(
alloc: CFAllocatorRef,
format_options: CFDictionaryRef,
format: CFStringRef,
va_list: VaList,
) -> CFString
pub unsafe fn create_with_format_and_arguments( alloc: CFAllocatorRef, format_options: CFDictionaryRef, format: CFStringRef, va_list: VaList, ) -> CFString
Creates an immutable string from a formatted string and a variable number of arguments (specified in a parameter of type va_list).
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_with_pascal_string(
alloc: CFAllocatorRef,
p_str: ConstStr255Param,
encoding: CFStringEncoding,
) -> CFString
pub unsafe fn create_with_pascal_string( alloc: CFAllocatorRef, p_str: ConstStr255Param, encoding: CFStringEncoding, ) -> CFString
Creates an immutable CFString object from a Pascal string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_with_pascal_string_no_copy(
alloc: CFAllocatorRef,
p_str: ConstStr255Param,
encoding: CFStringEncoding,
contents_deallocator: CFAllocatorRef,
) -> CFString
pub unsafe fn create_with_pascal_string_no_copy( alloc: CFAllocatorRef, p_str: ConstStr255Param, encoding: CFStringEncoding, contents_deallocator: CFAllocatorRef, ) -> CFString
Creates a CFString object from an external Pascal string buffer that might serve as the backing store for the object.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_with_substring(
alloc: CFAllocatorRef,
s: CFStringRef,
range: CFRange,
) -> CFString
pub unsafe fn create_with_substring( alloc: CFAllocatorRef, s: CFStringRef, range: CFRange, ) -> CFString
Creates an immutable string from a segment (substring) of an existing string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_array_with_find_results(
alloc: CFAllocatorRef,
string: CFStringRef,
string_to_find: CFStringRef,
range_to_search: CFRange,
compare_options: CFStringCompareFlags,
) -> CFArray
pub unsafe fn create_array_with_find_results( alloc: CFAllocatorRef, string: CFStringRef, string_to_find: CFStringRef, range_to_search: CFRange, compare_options: CFStringCompareFlags, ) -> CFArray
Searches a string for multiple occurrences of a substring and creates an array of ranges identifying the locations of these substrings within the target string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn find(
string: CFStringRef,
string_to_find: CFStringRef,
compare_options: CFStringCompareFlags,
) -> CFRange
pub unsafe fn find( string: CFStringRef, string_to_find: CFStringRef, compare_options: CFStringCompareFlags, ) -> CFRange
Searches for a substring within a string and, if it is found, yields the range of the substring within the object’s characters.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn find_character_from_set(
string: CFStringRef,
set: CFCharacterSetRef,
range_to_search: CFRange,
search_options: CFStringCompareFlags,
result: *mut CFRange,
) -> bool
pub unsafe fn find_character_from_set( string: CFStringRef, set: CFCharacterSetRef, range_to_search: CFRange, search_options: CFStringCompareFlags, result: *mut CFRange, ) -> bool
Query the range of the first character contained in the specified character set.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn find_with_options(
string: CFStringRef,
string_to_find: CFStringRef,
range_to_search: CFRange,
search_options: CFStringCompareFlags,
result: *mut CFRange,
) -> bool
pub unsafe fn find_with_options( string: CFStringRef, string_to_find: CFStringRef, range_to_search: CFRange, search_options: CFStringCompareFlags, result: *mut CFRange, ) -> bool
Searches for a substring within a range of the characters represented by a string and, if the substring is found, returns its range within the object’s characters.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn find_with_options_and_locale(
string: CFStringRef,
string_to_find: CFStringRef,
range_to_search: CFRange,
search_options: CFStringCompareFlags,
locale: CFLocaleRef,
result: *mut CFRange,
) -> bool
pub unsafe fn find_with_options_and_locale( string: CFStringRef, string_to_find: CFStringRef, range_to_search: CFRange, search_options: CFStringCompareFlags, locale: CFLocaleRef, result: *mut CFRange, ) -> bool
Returns a Boolean value that indicates whether a given string was found in a given source string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_line_bounds(
string: CFStringRef,
range: CFRange,
line_begin_index: *mut CFIndex,
line_end_index: *mut CFIndex,
contents_end_index: *mut CFIndex,
)
pub unsafe fn get_line_bounds( string: CFStringRef, range: CFRange, line_begin_index: *mut CFIndex, line_end_index: *mut CFIndex, contents_end_index: *mut CFIndex, )
Given a range of characters in a string, obtains the line bounds—that is, the indexes of the first character and the final characters of the lines containing the range.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn compare(
string1: CFStringRef,
string2: CFStringRef,
compare_options: CFStringCompareFlags,
) -> CFComparisonResult
pub unsafe fn compare( string1: CFStringRef, string2: CFStringRef, compare_options: CFStringCompareFlags, ) -> CFComparisonResult
Sourcepub unsafe fn compare_with_options(
string1: CFStringRef,
string2: CFStringRef,
range_to_compare: CFRange,
compare_options: CFStringCompareFlags,
) -> CFComparisonResult
pub unsafe fn compare_with_options( string1: CFStringRef, string2: CFStringRef, range_to_compare: CFRange, compare_options: CFStringCompareFlags, ) -> CFComparisonResult
Compares a range of the characters in one string with that of another string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn compare_with_options_and_locale(
string1: CFStringRef,
string2: CFStringRef,
range_to_compare: CFRange,
compare_options: CFStringCompareFlags,
locale: CFLocaleRef,
) -> CFComparisonResult
pub unsafe fn compare_with_options_and_locale( string1: CFStringRef, string2: CFStringRef, range_to_compare: CFRange, compare_options: CFStringCompareFlags, locale: CFLocaleRef, ) -> CFComparisonResult
Compares a range of the characters in one string with another string using a given locale.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn has_prefix(string: CFStringRef, prefix: CFStringRef) -> bool
pub unsafe fn has_prefix(string: CFStringRef, prefix: CFStringRef) -> bool
Determines if the character data of a string begin with a specified sequence of characters.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn has_suffix(string: CFStringRef, suffix: CFStringRef) -> bool
pub unsafe fn has_suffix(string: CFStringRef, suffix: CFStringRef) -> bool
Determines if a string ends with a specified sequence of characters.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn create_external_representation(
alloc: CFStringRef,
string: CFStringEncoding,
encoding: CFStringEncoding,
loss_byte: UInt8,
) -> CFData
pub unsafe fn create_external_representation( alloc: CFStringRef, string: CFStringEncoding, encoding: CFStringEncoding, loss_byte: UInt8, ) -> CFData
Creates an “external representation” of a CFString object, that is, a CFData object.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_bytes(
string: CFStringRef,
range: CFRange,
encoding: CFStringEncoding,
loss_byte: UInt8,
is_external_representation: Boolean,
buffer: *mut UInt8,
max_buf_len: CFIndex,
used_buf_len: *mut CFIndex,
) -> CFIndex
pub unsafe fn get_bytes( string: CFStringRef, range: CFRange, encoding: CFStringEncoding, loss_byte: UInt8, is_external_representation: Boolean, buffer: *mut UInt8, max_buf_len: CFIndex, used_buf_len: *mut CFIndex, ) -> CFIndex
Fetches a range of the characters from a string into a byte buffer after converting the characters to a specified encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_character_at_index(
string: CFStringRef,
idx: CFIndex,
) -> UniChar
pub unsafe fn get_character_at_index( string: CFStringRef, idx: CFIndex, ) -> UniChar
Returns the Unicode character at a specified location in a string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_characters(
string: CFStringRef,
range: CFRange,
buffer: &mut [UniChar],
)
pub unsafe fn get_characters( string: CFStringRef, range: CFRange, buffer: &mut [UniChar], )
Copies a range of the Unicode characters from a string to a user-provided buffer.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_characters_ptr(string: CFStringRef) -> *const UniChar
pub unsafe fn get_characters_ptr(string: CFStringRef) -> *const UniChar
Quickly obtains a pointer to the contents of a string as a buffer of Unicode characters.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_character_from_inline_buffer(
buf: *mut CFStringInlineBuffer,
idx: CFIndex,
) -> UniChar
pub unsafe fn get_character_from_inline_buffer( buf: *mut CFStringInlineBuffer, idx: CFIndex, ) -> UniChar
Returns the Unicode character at a specific location in an in-line buffer.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_c_string(
string: CFStringRef,
buffer: &mut [c_char],
buffer_size: CFIndex,
encoding: CFStringEncoding,
) -> bool
pub unsafe fn get_c_string( string: CFStringRef, buffer: &mut [c_char], buffer_size: CFIndex, encoding: CFStringEncoding, ) -> bool
Copies the character contents of a string to a local C string buffer after converting the characters to a given encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_c_string_ptr(
string: CFStringRef,
encoding: CFStringEncoding,
) -> *const c_char
pub unsafe fn get_c_string_ptr( string: CFStringRef, encoding: CFStringEncoding, ) -> *const c_char
Quickly obtains a pointer to a C-string buffer containing the characters of a string in a given encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_length(string: CFStringRef) -> CFIndex
pub unsafe fn get_length(string: CFStringRef) -> CFIndex
Returns the number (in terms of UTF-16 code pairs) of Unicode characters in a string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_pascal_string(
string: CFStringRef,
buffer: StringPtr,
buffer_size: CFIndex,
encoding: CFStringEncoding,
) -> bool
pub unsafe fn get_pascal_string( string: CFStringRef, buffer: StringPtr, buffer_size: CFIndex, encoding: CFStringEncoding, ) -> bool
Sourcepub unsafe fn get_pascal_string_ptr(
string: CFStringRef,
encoding: CFStringEncoding,
) -> ConstStr255Param
pub unsafe fn get_pascal_string_ptr( string: CFStringRef, encoding: CFStringEncoding, ) -> ConstStr255Param
Quickly obtains a pointer to a Pascal buffer containing the characters of a string in a given encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_range_of_composed_characters_at_index(
string: CFStringRef,
index: CFIndex,
) -> CFRange
pub unsafe fn get_range_of_composed_characters_at_index( string: CFStringRef, index: CFIndex, ) -> CFRange
Returns the range of the composed character sequence at a specified index.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn init_inline_buffer(
s: CFStringRef,
buf: *mut CFStringInlineBuffer,
range: CFRange,
)
pub unsafe fn init_inline_buffer( s: CFStringRef, buf: *mut CFStringInlineBuffer, range: CFRange, )
Sourcepub unsafe fn get_hyphenation_location_before_index(
string: CFStringRef,
location: CFIndex,
limit_range: CFRange,
options: CFOptionFlags,
locale: CFLocaleRef,
character: *mut UTF32Char,
) -> CFIndex
pub unsafe fn get_hyphenation_location_before_index( string: CFStringRef, location: CFIndex, limit_range: CFRange, options: CFOptionFlags, locale: CFLocaleRef, character: *mut UTF32Char, ) -> CFIndex
Retrieve the first potential hyphenation location found before the specified location.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn is_hyphenation_available_for_locale(
locale: CFLocaleRef,
) -> Boolean
pub unsafe fn is_hyphenation_available_for_locale( locale: CFLocaleRef, ) -> Boolean
Sourcepub unsafe fn convert_encoding_to_ianachar_set_name(
encoding: CFStringEncoding,
) -> CFString
pub unsafe fn convert_encoding_to_ianachar_set_name( encoding: CFStringEncoding, ) -> CFString
Returns the name of the IANA registry “charset” that is the closest mapping to a specified string encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn convert_encoding_to_nsstring_encoding(
encoding: CFStringEncoding,
) -> c_ulong
pub unsafe fn convert_encoding_to_nsstring_encoding( encoding: CFStringEncoding, ) -> c_ulong
Returns the Cocoa encoding constant that maps most closely to a given Core Foundation encoding constant.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn convert_encoding_to_windows_codepage(
encoding: CFStringEncoding,
) -> UInt32
pub unsafe fn convert_encoding_to_windows_codepage( encoding: CFStringEncoding, ) -> UInt32
Returns the Windows codepage identifier that maps most closely to a given Core Foundation encoding constant.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn convert_iana_char_set_name_to_encodingng(
string: CFStringRef,
) -> CFStringEncoding
pub unsafe fn convert_iana_char_set_name_to_encodingng( string: CFStringRef, ) -> CFStringEncoding
Returns the Core Foundation encoding constant that is the closest mapping to a given IANA registry “charset” name.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn convert_nsstring_encoding_to_encodingng(
encoding: c_ulong,
) -> CFStringEncoding
pub unsafe fn convert_nsstring_encoding_to_encodingng( encoding: c_ulong, ) -> CFStringEncoding
Returns the Core Foundation encoding constant that is the closest mapping to a given Cocoa encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn convert_windows_codepage_to_encoding(
codepage: UInt32,
) -> CFStringEncoding
pub unsafe fn convert_windows_codepage_to_encoding( codepage: UInt32, ) -> CFStringEncoding
Returns the Core Foundation encoding constant that is the closest mapping to a given Windows codepage identifier.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_fastest_encoding(string: CFStringRef) -> CFStringEncoding
pub unsafe fn get_fastest_encoding(string: CFStringRef) -> CFStringEncoding
Sourcepub unsafe fn get_list_of_available_encodings() -> *const CFStringEncoding
pub unsafe fn get_list_of_available_encodings() -> *const CFStringEncoding
Returns a pointer to a list of string encodings supported by the current system.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_maximum_size_for_encoding(
length: CFIndex,
encoding: CFStringEncoding,
) -> CFIndex
pub unsafe fn get_maximum_size_for_encoding( length: CFIndex, encoding: CFStringEncoding, ) -> CFIndex
Returns the maximum number of bytes a string of a specified length (in Unicode characters) will take up if encoded in a specified encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_most_compatible_mac_string_encoding(
encoding: CFStringEncoding,
) -> CFStringEncoding
pub unsafe fn get_most_compatible_mac_string_encoding( encoding: CFStringEncoding, ) -> CFStringEncoding
Returns the most compatible Mac OS script value for the given input encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_name_of_encoding(encoding: CFStringEncoding) -> CFString
pub unsafe fn get_name_of_encoding(encoding: CFStringEncoding) -> CFString
Returns the canonical name of a specified string encoding.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_smallest_encoding(string: CFStringRef) -> CFStringEncoding
pub unsafe fn get_smallest_encoding(string: CFStringRef) -> CFStringEncoding
Returns the smallest encoding on the current system for the character contents of a string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_system_encoding() -> CFStringEncoding
pub unsafe fn get_system_encoding() -> CFStringEncoding
Returns the default encoding used by the operating system when it creates strings.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn is_encoding_available(encoding: CFStringEncoding) -> bool
pub unsafe fn is_encoding_available(encoding: CFStringEncoding) -> bool
Determines whether a given Core Foundation string encoding is available on the current system.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_double_value(s: CFStringRef) -> c_double
pub unsafe fn get_double_value(s: CFStringRef) -> c_double
Sourcepub unsafe fn get_int_value(s: CFStringRef) -> SInt32
pub unsafe fn get_int_value(s: CFStringRef) -> SInt32
Sourcepub unsafe fn cf_show_str(s: CFStringRef)
pub unsafe fn cf_show_str(s: CFStringRef)
Prints the attributes of a string during debugging.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_type_id() -> CFTypeID
pub unsafe fn get_type_id() -> CFTypeID
Sourcepub unsafe fn create_with_file_system_representation(
alloc: CFAllocatorRef,
buffer: *const c_char,
) -> CFString
pub unsafe fn create_with_file_system_representation( alloc: CFAllocatorRef, buffer: *const c_char, ) -> CFString
Sourcepub unsafe fn get_file_system_representation(
string: CFStringRef,
buffer: &mut [c_char],
max_buf_len: CFIndex,
) -> Boolean
pub unsafe fn get_file_system_representation( string: CFStringRef, buffer: &mut [c_char], max_buf_len: CFIndex, ) -> Boolean
Extracts the contents of a string as a NULL-terminated 8-bit string appropriate for passing to POSIX APIs.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_maximum_size_of_file_system_representation(
string: CFStringRef,
) -> CFIndex
pub unsafe fn get_maximum_size_of_file_system_representation( string: CFStringRef, ) -> CFIndex
Determines the upper bound on the number of bytes required to hold the file system representation of the string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_paragraph_bounds(
string: CFStringRef,
range: CFRange,
par_begin_index: *mut CFIndex,
par_end_index: *mut CFIndex,
contents_end_index: *mut CFIndex,
)
pub unsafe fn get_paragraph_bounds( string: CFStringRef, range: CFRange, par_begin_index: *mut CFIndex, par_end_index: *mut CFIndex, contents_end_index: *mut CFIndex, )
Determines the upper bound on the number of bytes required to hold the file system representation of the string.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_long_character_for_surrogate_pair(
surrogate_high: UniChar,
surrogate_low: UniChar,
) -> UTF32Char
pub unsafe fn get_long_character_for_surrogate_pair( surrogate_high: UniChar, surrogate_low: UniChar, ) -> UTF32Char
Returns a UTF-32 character that corresponds to a given pair of UTF-16 surrogate characters.
§Safety
This function dereferences a raw pointer
Sourcepub unsafe fn get_surrogate_pair_for_long_character(
character: UTF32Char,
surrogates: &mut [UniChar],
) -> Boolean
pub unsafe fn get_surrogate_pair_for_long_character( character: UTF32Char, surrogates: &mut [UniChar], ) -> Boolean
Maps a given UTF-32 character to a pair of UTF-16 surrogate characters.
§Safety
This function dereferences a raw pointer