1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/string.h
3 // Purpose: String conversion methods
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_STRING_H__
13 #define __WX_COCOA_STRING_H__
15 #import <Foundation/NSString.h>
16 #include "wx/string.h"
18 // Return an autoreleased NSString
19 inline NSString
* wxNSStringWithWxString(const wxString
&wxstring
)
21 return [NSString stringWithCString
: wxstring
.c_str() length
:wxstring
.Len()];
24 // Intialize an NSString which has already been allocated
25 inline NSString
* wxInitNSStringWithWxString(NSString
*nsstring
, const wxString
&wxstring
)
27 return [nsstring initWithCString
: wxstring
.c_str() length
:wxstring
.Len()];
30 #endif // __WX_COCOA_STRING_H__