mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-15 21:21:45 +00:00
trim whitespace from server info responses
This commit is contained in:
@@ -24,3 +24,9 @@ FOUNDATION_EXPORT NSString *const deviceName;
|
||||
+ (int) resolveHost:(NSString*)host;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSString (NSStringWithTrim)
|
||||
|
||||
- (NSString*) trim;
|
||||
|
||||
@end
|
||||
@@ -73,5 +73,12 @@ NSString *const deviceName = @"roth";
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSString (NSStringWithTrim)
|
||||
|
||||
- (NSString *)trim {
|
||||
return [self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user