#include <NSNumberOOExtensions.h>
Definition at line 33 of file NSNumberOOExtensions.h.
◆ oo_isBoolean
Definition at line 1 of file NSNumberOOExtensions.m.
50{
51
52
53
54
55
56
57
58
59
60#if __COREFOUNDATION_CFNUMBER__
61 return self == (NSNumber *)kCFBooleanTrue || self == (NSNumber *)kCFBooleanFalse;
62#else
63 static NSNumber *sTrue =
nil, *sFalse;
65 {
66 sTrue = [[NSNumber numberWithBool:YES] retain];
67 sFalse = [[NSNumber numberWithBool:NO] retain];
68 }
69 return self == sTrue || self == sFalse;
70#endif
71}
◆ oo_isFloatingPointNumber
- (BOOL) oo_isFloatingPointNumber |
|
|
|
Definition at line 1 of file NSNumberOOExtensions.m.
35{
36#if __COREFOUNDATION_CFNUMBER__
37 return CFNumberIsFloatType((CFNumberRef)self);
38#else
39
40
41
42
43 const char *type = [self objCType];
44 return (strcmp(type, @encode(double)) == 0 || strcmp(type, @encode(float)) == 0);
45#endif
46}
The documentation for this category was generated from the following files: