diff --git a/Frameworks/RSCore/RSCore/NSString+RSCore.h b/Frameworks/RSCore/RSCore/NSString+RSCore.h index 1a454fa89..28a237649 100755 --- a/Frameworks/RSCore/RSCore/NSString+RSCore.h +++ b/Frameworks/RSCore/RSCore/NSString+RSCore.h @@ -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 diff --git a/Frameworks/RSCore/RSCore/NSString+RSCore.m b/Frameworks/RSCore/RSCore/NSString+RSCore.m index 9e2ed073d..b81b3180f 100755 --- a/Frameworks/RSCore/RSCore/NSString+RSCore.m +++ b/Frameworks/RSCore/RSCore/NSString+RSCore.m @@ -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