aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPStringAdditions.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-06-24 09:15:42 +0000
committerBibiko <bibiko@eva.mpg.de>2010-06-24 09:15:42 +0000
commited0e2e03219746667d71b9cccc72c2958bdd4d12 (patch)
tree61edecd7bcf1bd7a24cc1bb9938d63332a8892ae /Source/SPStringAdditions.m
parent797cb978a774945882fbbeab4623349975c65c84 (diff)
downloadsequelpro-ed0e2e03219746667d71b9cccc72c2958bdd4d12.tar.gz
sequelpro-ed0e2e03219746667d71b9cccc72c2958bdd4d12.tar.bz2
sequelpro-ed0e2e03219746667d71b9cccc72c2958bdd4d12.zip
• further progress to support "Save Session" (all opened windows plus including tabs connections)
- loop through all windows and for each window through all tabs and save all untitled doc within the bundle named via UUIDs and all opened spf files • added the SPStringAddition method +[NSString stringWithNewUUID] which returns a new UUID string
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 de1fdf5e..fc8326e7 100644
--- a/Source/SPStringAdditions.m
+++ b/Source/SPStringAdditions.m
@@ -143,6 +143,20 @@
}
/**
+ * Returns a new created UUID string.
+ */
++ (NSString*)stringWithNewUUID
+{
+ // Create a new UUID
+ CFUUIDRef uuidObj = CFUUIDCreate(nil);
+
+ // Get the string representation of the UUID
+ NSString *newUUID = (NSString*)CFUUIDCreateString(nil, uuidObj);
+ CFRelease(uuidObj);
+ return [newUUID autorelease];
+}
+
+/**
* Escapes HTML special characters.
*/
- (NSString *)HTMLEscapeString