-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathUUData.h
More file actions
47 lines (34 loc) · 1.3 KB
/
UUData.h
File metadata and controls
47 lines (34 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// UUData.h
// Useful Utilities - extensions for NSData and NSMutableData
//
// Created by Ryan on 02/01/16
//
// License:
// You are free to use this code for whatever purposes you desire. The only requirement is that you smile everytime you use it.
//
#import <Foundation/Foundation.h>
@interface NSData (UUToolbox)
- (UInt8) uuUInt8AtIndex:(NSUInteger)index;
- (UInt16) uuUInt16AtIndex:(NSUInteger)index;
- (UInt32) uuUInt32AtIndex:(NSUInteger)index;
- (UInt64) uuUInt64AtIndex:(NSUInteger)index;
- (SInt8) uuSInt8AtIndex:(NSUInteger)index;
- (SInt16) uuSInt16AtIndex:(NSUInteger)index;
- (SInt32) uuSInt32AtIndex:(NSUInteger)index;
- (SInt64) uuSInt64AtIndex:(NSUInteger)index;
- (NSData*) uuDataAtIndex:(NSUInteger)index count:(NSUInteger)count;
- (NSString*) uuStringAtIndex:(NSUInteger)index count:(NSUInteger)count encoding:(NSStringEncoding)encoding;
- (NSString*) uuToHexString;
@end
@interface NSMutableData (UUToolbox)
- (void) uuAppendUInt8:(UInt8)data;
- (void) uuAppendUInt16:(UInt16)data;
- (void) uuAppendUInt32:(UInt32)data;
- (void) uuAppendUInt64:(UInt64)data;
- (void) uuAppendSInt8:(SInt8)data;
- (void) uuAppendSInt16:(SInt16)data;
- (void) uuAppendSInt32:(SInt32)data;
- (void) uuAppendSInt64:(SInt64)data;
- (void) uuAppendString:(NSString*)data encoding:(NSStringEncoding)encoding;
@end