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 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