diff options
author | rowanbeentje <rowan@beent.je> | 2012-03-18 17:24:52 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-03-18 17:24:52 +0000 |
commit | c70dc822c2b9d2d39a65bdde0ca7b61a1355b846 (patch) | |
tree | ecf5e56de73650232bc9f2ec85e4a6c935cfdd4a /Source/SPDataBase64EncodingAdditions.m | |
parent | efd7982171996f7ba448fba269a728f6ff1afccc (diff) | |
download | sequelpro-c70dc822c2b9d2d39a65bdde0ca7b61a1355b846.tar.gz sequelpro-c70dc822c2b9d2d39a65bdde0ca7b61a1355b846.tar.bz2 sequelpro-c70dc822c2b9d2d39a65bdde0ca7b61a1355b846.zip |
- Add a base64Encoding method for convenience when the result should be all on one line, and use it in SPTableContent
Diffstat (limited to 'Source/SPDataBase64EncodingAdditions.m')
-rw-r--r-- | Source/SPDataBase64EncodingAdditions.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/SPDataBase64EncodingAdditions.m b/Source/SPDataBase64EncodingAdditions.m index 788184cf..9ca32b14 100644 --- a/Source/SPDataBase64EncodingAdditions.m +++ b/Source/SPDataBase64EncodingAdditions.m @@ -30,6 +30,15 @@ static const char _base64EncodingTable[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgh @implementation NSData (SPDataBase64EncodingAdditions) /** + * Returns a base64-encoded representation of the NSData as an NSString, + * on a single line. + */ +- (NSString *)base64Encoding +{ + return [self base64EncodingWithLineLength:NSNotFound]; +} + +/** * Returns a base64-encoded representation of the NSData as an NSString. * Takes an argument for the maximum output line length; supply 0 or NSNotFound * to have the results on a single line. |