+(NSString*)replaceNullValuesWithEmptyString:(id)tempObj
{
if (([tempObj isKindOfClass:[NSNull class]])||
(tempObj == nil) ||
(tempObj == (id)[NSNull null])||
[tempObj isEqual:[NSNull null]] ||
[tempObj isEqual:nil]) {
}
else {
if([tempObj respondsToSelector:@selector(isEqualToString:)]) {
if ([tempObj isEqualToString:@"<null>"] ||
[tempObj isEqualToString:@"(null)"]) {
}
else {
if ([tempObj respondsToSelector:@selector(length)]) {
if ([tempObj length]>0) {
NSLog(@"Check Passed.");
return tempObj;
}
}
}
}
}
NSLog(@"Check failed.");
return @"";
}
No comments:
Post a Comment