UgiUtil Class Reference
Overview
UgiUtil is a collection of useful static methods
Class Methods | |
(NSString *_Nullable) | + dataToHexString: |
Utility to convert NSData to a string of hex digits (uppercase) More... | |
(NSString *_Nullable) | + bytesToHexString:length: |
Utility to convert bytes to a string of hex digits (uppercase) More... | |
(NSData *_Nullable) | + hexStringToData: |
Utility to convert a hex string to NSData More... | |
(int) | + hexStringToInt: |
Utility to convert a hex string to an integer More... | |
(int) | + hexStringToBytes:toBuffer:bufferSize: |
Utility to convert string to bytes More... | |
(NSString *) | + stackTraceWithFrames:removeRedacted:skipTopFrame: |
Utility to get a stack trace More... | |
Instance Method Documentation
◆ dataToHexString:()
+ (NSString * _Nullable) dataToHexString: | (NSData *_Nullable) | data |
Utility to convert NSData to a string of hex digits (uppercase)
- Parameters
-
data NSData object to convert to a string
- Returns
- String of hex digits
◆ bytesToHexString:length:()
+ (NSString * _Nullable) bytesToHexString: | (const uint8_t *_Nullable) | ba | |
length: | (int) | len | |
Utility to convert bytes to a string of hex digits (uppercase)
- Parameters
-
ba Byte array to convert len Length of byte array
- Returns
- String of hex digits
◆ hexStringToData:()
+ (NSData * _Nullable) hexStringToData: | (NSString *_Nullable) | s |
Utility to convert a hex string to NSData
- Parameters
-
s String to convert
- Returns
- NSData
◆ hexStringToInt:()
+ (int) hexStringToInt: | (NSString *_Nullable) | s |
Utility to convert a hex string to an integer
- Parameters
-
s String to convert
- Returns
- integer
◆ hexStringToBytes:toBuffer:bufferSize:()
+ (int) hexStringToBytes: | (NSString *_Nullable) | s | |
toBuffer: | (uint8_t *_Nonnull) | ba | |
bufferSize: | (int) | bufferSize | |
Utility to convert string to bytes
- Parameters
-
s String to convert ba Buffer to put result in bufferSize Size of the buffer in bytes
- Returns
- Number of bytes
◆ stackTraceWithFrames:removeRedacted:skipTopFrame:()
+ (NSString *) stackTraceWithFrames: | (int) | numFrames | |
removeRedacted: | (BOOL) | removeRedacted | |
skipTopFrame: | (BOOL) | skipTopFrame | |
Utility to get a stack trace
- Parameters
-
numFrames Number of frames removeRedacted YES to remove "redacted" stack frames skipTopFrame YES to skip the stack frame of the caller
- Returns
- Stack trace
Copyright © 2012-2017 U Grok It, Inc. connect@UGrokIt.com U Grok It and the U Grok It logo are registered trademarks of U Grok It, Inc. All other trademarks and copyrights are the property of their respective owners |