X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/323746d39bfa3830194974658233d0b45809b060..2db33ea12fcfa87654ecf0ba54db21786f1fe821:/Cydia/MIMEAddress.mm diff --git a/Cydia/MIMEAddress.mm b/Cydia/MIMEAddress.mm index e4dcbabc..a30be35f 100644 --- a/Cydia/MIMEAddress.mm +++ b/Cydia/MIMEAddress.mm @@ -1,5 +1,5 @@ /* Cydia - iPhone UIKit Front-End for Debian APT - * Copyright (C) 2008-2013 Jay Freeman (saurik) + * Copyright (C) 2008-2015 Jay Freeman (saurik) */ /* GNU General Public License, Version 3 {{{ */ @@ -19,11 +19,12 @@ **/ /* }}} */ -#include "Cydia/MIMEAddress.h" +#include "CyteKit/UCPlatform.h" -#include +#include "Cydia/MIMEAddress.h" +#include "CyteKit/RegEx.hpp" -#include "CyteKit/PerlCompatibleRegEx.hpp" +#include "iPhonePrivate.h" @implementation MIMEAddress @@ -61,9 +62,9 @@ - (id) initWithString:(NSString *)string { if ((self = [super init]) != nil) { const char *data = [string UTF8String]; - size_t size = [string length]; + size_t size = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; - static Pcre address_r("^\"?(.*)\"? <([^>]*)>$"); + static RegEx address_r("\"?(.*)\"? <([^>]*)>"); if (address_r(data, size)) { name_ = address_r[1];