Re: figuring out the length of a string
Re: figuring out the length of a string
- Subject: Re: figuring out the length of a string
- From: Chris Ridd <email@hidden>
- Date: Fri, 25 Jun 2004 07:57:03 +0100
On 25/6/04 7:51 am, Mark A. Stratman <email@hidden> wrote:
>
The toll-free bindings work as far as treating an NSString as a
>
CFString, but I don't think it works the other way around.
No, it works both ways:
<URL:
http://developer.apple.com/documentation/CoreFoundation/Reference/CFStr
ingRef/index.html>
---
CFString is 3toll-free bridged2 with its Cocoa Foundation counterpart,
NSString. This means that the Core Foundation type is interchangeable in
function or method calls with the bridged Foundation object. Therefore, in a
method where you see an NSString * parameter, you can pass in a CFStringRef,
and in a function where you see a CFStringRef parameter, you can pass in an
NSString instance. This fact also applies to concrete subclasses of
NSString. See Integrating Carbon and Cocoa in Your Application for more
information on toll-free bridging.
---
Cheers,
Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.