aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPStringAdditions.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPStringAdditions.m')
-rw-r--r--Source/SPStringAdditions.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m
index 0254dc36..ebd81a54 100644
--- a/Source/SPStringAdditions.m
+++ b/Source/SPStringAdditions.m
@@ -562,3 +562,17 @@ static NSInteger _smallestOf(NSInteger a, NSInteger b, NSInteger c)
return min;
}
+
+@implementation NSMutableString (SPStringAdditions)
+
+- (void)setStringOrNil:(NSString *)aString
+{
+ [self setString:(aString? aString : @"")];
+}
+
+- (void)appendStringOrNil:(NSString *)aString
+{
+ [self appendString:(aString? aString : @"")];
+}
+
+@end