aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPStringAdditions.h
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-06-16 21:28:35 +0200
committerMax <post@wickenrode.com>2015-06-17 11:54:47 +0200
commit33539b983532720eede12768fc5a32c6dabb3ca8 (patch)
treef3b275ed5d12e217981d3b8671fb994deab2304f /Source/SPStringAdditions.h
parent8febe85e1cb92fa7f4fc073607bd8b08f850b446 (diff)
downloadsequelpro-33539b983532720eede12768fc5a32c6dabb3ca8.tar.gz
sequelpro-33539b983532720eede12768fc5a32c6dabb3ca8.tar.bz2
sequelpro-33539b983532720eede12768fc5a32c6dabb3ca8.zip
The export code caused an exception when no database was selected but the filename contained the database token (fixes #2145)
Diffstat (limited to 'Source/SPStringAdditions.h')
-rw-r--r--Source/SPStringAdditions.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/SPStringAdditions.h b/Source/SPStringAdditions.h
index c6871e2a..7c0bfb90 100644
--- a/Source/SPStringAdditions.h
+++ b/Source/SPStringAdditions.h
@@ -101,3 +101,17 @@ static inline id NSMutableAttributedStringAttributeAtIndex(NSMutableAttributedSt
*/
- (BOOL)nonConsecutivelySearchString:(NSString *)other matchingRanges:(NSArray **)submatches;
@end
+
+@interface NSMutableString (SPStringAdditions)
+/**
+ * nil-safe variant of setString:
+ * nil will be interpreted as @"" instead of throwing an exception
+ */
+- (void)setStringOrNil:(NSString *)aString;
+
+/**
+ * nil-safe variant of appendString:
+ * nil will be interpreted as @"" instead of throwing an exception
+ */
+- (void)appendStringOrNil:(NSString *)aString;
+@end