diff options
Diffstat (limited to 'Source/SPDataAdditions.h')
-rw-r--r-- | Source/SPDataAdditions.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/SPDataAdditions.h b/Source/SPDataAdditions.h index 5158c270..cd8374f6 100644 --- a/Source/SPDataAdditions.h +++ b/Source/SPDataAdditions.h @@ -28,6 +28,13 @@ // // More info at <https://github.com/sequelpro/sequelpro> +typedef NS_OPTIONS(NSUInteger, SPLineTerminator) { + SPLineTerminatorAny = 0, + SPLineTerminatorCR = 1, + SPLineTerminatorLF = 2, + SPLineTerminatorCRLF = 4, +}; + @interface NSData (SPDataAdditions) - (NSData *)sha1Hash; @@ -46,4 +53,6 @@ - (NSString *)stringRepresentationUsingEncoding:(NSStringEncoding)encoding; - (NSString *)shortStringRepresentationUsingEncoding:(NSStringEncoding)encoding; +- (void)enumerateLinesBreakingAt:(SPLineTerminator)lbChars withBlock:(void (^)(NSRange line,BOOL *stop))block; + @end |