/ NSConstantString.m
NSConstantString.m
1 // 2 // NSConstantString.m 3 // CoreFoundation 4 // 5 // Copyright (c) 2014 Apportable. All rights reserved. 6 // 7 8 #import "NSStringInternal.h" 9 10 #import <objc/runtime.h> 11 12 @implementation __NSCFConstantString 13 14 SINGLETON_RR() 15 16 - (id)copyWithZone:(NSZone *)zone 17 { 18 return self; 19 } 20 21 - (BOOL)isKindOfClass:(Class)cls 22 { 23 if ([super isKindOfClass: cls]) { 24 return YES; 25 } 26 return cls == objc_lookUpClass("NSString"); 27 } 28 29 @end