mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-26 09:33:25 +01: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:
parent
0c54e61fbc
commit
d093bf9a21
@ -76,6 +76,8 @@ typedef struct {
|
|||||||
|
|
||||||
- (NSString *)rs_stringByStrippingHTTPOrHTTPSScheme;
|
- (NSString *)rs_stringByStrippingHTTPOrHTTPSScheme;
|
||||||
|
|
||||||
|
+ (NSString *)rs_debugStringWithData:(NSData *)d; // Assume it’s UTF8, at least for now. Good enough for most debugging purposes.
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@ -416,6 +416,10 @@ NSString *RSStringReplaceAll(NSString *stringToSearch, NSString *searchFor, NSSt
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (NSString *)rs_debugStringWithData:(NSData *)d {
|
||||||
|
|
||||||
|
return [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user