]>
Commit | Line | Data |
---|---|---|
1 | /////////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/cocoa/string.h | |
3 | // Purpose: String conversion methods | |
4 | // Author: David Elliott | |
5 | // Modified by: | |
6 | // Created: 2003/04/13 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2003 David Elliott | |
9 | // Licence: wxWindows licence | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef __WX_COCOA_STRING_H__ | |
13 | #define __WX_COCOA_STRING_H__ | |
14 | ||
15 | #import <Foundation/NSString.h> | |
16 | #include "wx/string.h" | |
17 | ||
18 | // Return an autoreleased NSString | |
19 | inline NSString* wxNSStringWithWxString(const wxString &wxstring) | |
20 | { | |
21 | return [NSString stringWithCString: wxstring.c_str() length:wxstring.Len()]; | |
22 | } | |
23 | ||
24 | // Intialize an NSString which has already been allocated | |
25 | inline NSString* wxInitNSStringWithWxString(NSString *nsstring, const wxString &wxstring) | |
26 | { | |
27 | return [nsstring initWithCString: wxstring.c_str() length:wxstring.Len()]; | |
28 | } | |
29 | ||
30 | #endif // __WX_COCOA_STRING_H__ |