Git.framework Reference Library

NSData(Searching) Category Reference

NSData(Searching) Category Reference

Declared in NSData+Searching.h

Overview

This category provides ranging and splitting of NSData objects.

Tasks

Instance Methods

rangeFrom:toByte:

- (NSRange)rangeFrom:(NSInteger)start toByte:(NSInteger)c
Return Value

Range of bytes up to the first occurrence of c from start. If c can not be found then the NSRange.location will be set to NSNotFound.

Discussion

Returns the range of bytes up to the first occurrence of byte c from start.

Declared In
NSData+Searching.h

rangeOfNullTerminatedBytesFrom:

- (NSRange)rangeOfNullTerminatedBytesFrom:(NSInteger)start
Return Value

Range of bytes up to the first NULL from start. If no NULL can be found then the NSRange.location will be set to NSNotFound.

Discussion

Returns the range of bytes up to the first NULL byte from start.

Declared In
NSData+Searching.h

subdataFromIndex:

- (NSData *)subdataFromIndex:(NSUInteger)index
Parameters
index

Start of the range which defines the limits to extract.

Return Value

A data object containing a copy of the receiver's bytes that fall within the limits of index and the end of the bytes.

Discussion

Returns a data object containing a copy of the receiver's bytes that fall within the limits specified by a given index and the end of the bytes.

See Also
Declared In
NSData+Searching.h

subdataToIndex:

- (NSData *)subdataToIndex:(NSUInteger)index
Parameters
index

End of the range which defines the limits to extract.

Return Value

A data object containing a copy of the receiver's bytes that fall within the first byte and index.

Discussion

Returns a data object containing a copy of the receiver's bytes that fall within the first byte and index.

See Also
Declared In
NSData+Searching.h

Last updated: 2011-2-20