Skip to content

Instantly share code, notes, and snippets.

@gdeglin
Created July 2, 2013 03:33
Show Gist options
  • Save gdeglin/5906607 to your computer and use it in GitHub Desktop.
Save gdeglin/5906607 to your computer and use it in GitHub Desktop.
static NSString * AFNormalizedDeviceTokenStringWithDeviceToken(id deviceToken) {
return [[[[deviceToken description] uppercaseString] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]] stringByReplacingOccurrencesOfString:@" " withString:@""];
}
@bdon
Copy link

bdon commented Jul 2, 2013

(lldb) po [@"foo" stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
$2 = 0x0813c1a0 foo
(lldb) po [@"fo<>o" stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
$3 = 0x0813c260 fo<>o
(lldb) po [@"<fo<>o>" stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
$4 = 0x08237d80 fo<>o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment