Skip to content

Commit

Permalink
Some doc aliases for cf::String
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Oct 23, 2024
1 parent 0dbb7c5 commit 161fe4d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cidre/src/cf/string.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use core::fmt;
use std::{borrow::Cow, ffi::CStr, os::raw::c_char, str::from_utf8_unchecked};
use std::{
borrow::Cow,
ffi::{c_char, CStr},
str::from_utf8_unchecked,
};

use crate::{
arc,
Expand Down Expand Up @@ -364,21 +368,25 @@ define_cf_type!(
);

impl StringMut {
#[doc(alias = "CFStringAppend")]
#[inline]
pub fn append(&mut self, appended_string: &String) {
unsafe { CFStringAppend(self, appended_string) }
}

#[doc(alias = "CFStringTrim")]
#[inline]
pub fn trim(&mut self, trim_string: &String) {
unsafe { CFStringTrim(self, trim_string) }
}

#[doc(alias = "CFStringTrimWhitespace")]
#[inline]
pub fn trim_whitespace(&mut self) {
unsafe { CFStringTrimWhitespace(self) }
}

#[doc(alias = "CFStringCreateMutable")]
#[inline]
pub fn create_in(max_length: Index, alloc: Option<&cf::Allocator>) -> Option<arc::R<Self>> {
unsafe { CFStringCreateMutable(alloc, max_length) }
Expand Down

0 comments on commit 161fe4d

Please # to comment.