1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-25 23:02:35 +03:00
vimr/NvimView/NvimServer/CocoaCategories.m
2017-12-03 09:59:15 +01:00

27 lines
427 B
Objective-C

/**
* Tae Won Ha - http://taewon.de - @hataewon
* See LICENSE
*/
#import "CocoaCategories.h"
@implementation NSObject (NeoVimServer)
- (const char *)cdesc {
return self.description.cstr;
}
@end
@implementation NSString (NeoVimServer)
- (const char *)cstr {
return [self cStringUsingEncoding:NSUTF8StringEncoding];
}
- (NSUInteger)clength {
return [self lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
}
@end