mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Add rs_debugStringWithData — to use when debugging. A quick way to turn data into a string. It will work most of the time. Good enough for debugging.
This commit is contained in:
@@ -76,6 +76,8 @@ typedef struct {
|
||||
|
||||
- (NSString *)rs_stringByStrippingHTTPOrHTTPSScheme;
|
||||
|
||||
+ (NSString *)rs_debugStringWithData:(NSData *)d; // Assume it’s UTF8, at least for now. Good enough for most debugging purposes.
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -416,6 +416,10 @@ NSString *RSStringReplaceAll(NSString *stringToSearch, NSString *searchFor, NSSt
|
||||
return s;
|
||||
}
|
||||
|
||||
+ (NSString *)rs_debugStringWithData:(NSData *)d {
|
||||
|
||||
return [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user