NSString_ObjCPlusPlus.mm
上传用户:center1979
上传日期:2022-07-26
资源大小:50633k
文件大小:1k
源码类别:
OpenGL
开发平台:
Visual C++
- //
- // NSString_ObjCPlusPlus.mm
- // celestia
- //
- // Created by Bob Ippolito on Fri Jun 07 2002.
- // Copyright (c) 2002 Chris Laurel. All rights reserved.
- //
- #import "NSString_ObjCPlusPlus.h"
- @implementation NSString(ObjCPlusPlus)
- -(std::string)stdString
- {
- return std::string([self UTF8String]);
- }
- -(NSString *)initWithStdString:(std::string)str
- {
- return [self initWithUTF8String:str.c_str()];
- }
- +(NSString *)stringWithStdString:(std::string)str
- {
- return [NSString stringWithUTF8String:str.c_str()];
- }
- @end