Skip to content

Commit c9abef0

Browse files
committed
typo fixes
1 parent 5edc8d6 commit c9abef0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ pub fn leak(str: &str) {
2424
INSString.as_str() internaly uses UTF8String property of NSString.
2525
[Apple doc](https://developer.apple.com/documentation/foundation/nsstring/1411189-utf8string?language=objc)
2626
says that the memory behind this pointer has a lifetime shorter than a lifetime of an NSString itself.
27-
But apparently, this is not entirely true. At least, this statement is not valid from strings that contain
27+
But apparently, this is not entirely true. At least, this statement is not valid for strings that contain
2828
characters outside the ASCI range. And sometimes for strings that do not.
2929

3030
Sadly, I did not find any reason for that.
3131

3232
So in the end, the actual leak occurs not in INSString.as_str() but, I guess, in objc runtime.
3333

34-
## Is there a warkaround?
34+
## Is there a workaround?
3535

3636
Yes. NSString::getCString ([Apple doc](https://developer.apple.com/documentation/foundation/nsstring/1415702-getcstring)) and we can use it like this:
3737

0 commit comments

Comments
 (0)