FMLiveSwitchAscii Class Reference

ASCII encoding/decoding utility. More...

Instance Methods

(instancetype) - init
 

Class Methods

(FMLiveSwitchAscii *) + ascii
 
(NSString *) + decodeWithInput:
 Decodes a UTF-8 byte array to a string. More...
 
(NSString *) + decodeWithInput:index:length:
 Decodes a UTF-8 byte array to a string. More...
 
(NSMutableData *) + encodeWithInput:
 Encodes a string to a UTF-8 byte array. More...
 
(int) + getByteCountWithInput:
 Gets the number of bytes that would be returned by a call to encode. More...
 

Detailed Description

ASCII encoding/decoding utility.

Method Documentation

◆ ascii

+ (FMLiveSwitchAscii*) ascii

◆ decodeWithInput:

+ (NSString*) decodeWithInput: (NSMutableData *)  input

Decodes a UTF-8 byte array to a string.

Parameters
inputThe input byte array.

◆ decodeWithInput:index:length:

+ (NSString*) decodeWithInput: (NSMutableData *)  input
index: (int)  index
length: (int)  length 

Decodes a UTF-8 byte array to a string.

Parameters
inputThe input byte array.
indexThe index to start reading.
lengthThe length.

◆ encodeWithInput:

+ (NSMutableData*) encodeWithInput: (NSString *)  input

Encodes a string to a UTF-8 byte array.

Parameters
inputThe input string.

◆ getByteCountWithInput:

+ (int) getByteCountWithInput: (NSString *)  input

Gets the number of bytes that would be returned by a call to encode.

Parameters
inputThe input string.

◆ init

- (instancetype) init