<code>
- (NSString *)replaceNullValue:(NSString *)string
{
NSString *newStr = [NSString stringWithFormat:@"%@", string];
if ([newStr isKindOfClass:[NSNull class]] ||
newStr == nil ||
[newStr isEqualToString:@"(null)"] ||
[newStr isEqualToString:@""] ||
[newStr isEqualToString:@"null"] ||
[newStr isEqualToString:@"<null>"]) {
newStr = @"";
}
return newStr;
}
</code>
网友评论