File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
15
15
* Added ` NSNotFound ` .
16
16
* Added ` NSBundle ` .
17
17
* Added ` NSTimeInterval ` .
18
+ * Added ` NSString::len_utf16 ` and ` NSAttributedString::len_utf16 ` .
18
19
19
20
20
21
## objc2 0.3.0-beta.2 - 2022-08-28
Original file line number Diff line number Diff line change @@ -85,9 +85,7 @@ extern_methods!(
85
85
/// Alias for `self.string().len_utf16()`.
86
86
#[ doc( alias = "length" ) ]
87
87
#[ sel( length) ]
88
- #[ allow( unused) ]
89
- // TODO: Finish this
90
- fn len_utf16( & self ) -> usize ;
88
+ pub fn len_utf16( & self ) -> usize ;
91
89
92
90
// /// TODO
93
91
// ///
Original file line number Diff line number Diff line change @@ -63,13 +63,12 @@ extern_methods!(
63
63
unsafe { msg_send![ self , lengthOfBytesUsingEncoding: UTF8_ENCODING ] }
64
64
}
65
65
66
- /// The number of UTF-16 code units in `self` .
66
+ /// The number of UTF-16 code units in the string .
67
67
///
68
68
/// See also [`NSString::len`].
69
69
#[ doc( alias = "length" ) ]
70
- // TODO: Finish this
71
70
#[ sel( length) ]
72
- fn len_utf16( & self ) -> usize ;
71
+ pub fn len_utf16( & self ) -> usize ;
73
72
74
73
pub fn is_empty( & self ) -> bool {
75
74
// TODO: lengthOfBytesUsingEncoding: might sometimes return 0 for
You can’t perform that action at this time.
0 commit comments