X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/6d9696a59dd8fe72d3c46e0703d2a019806b50ed..02ccb263caa97381f1eaf9ed305ff57fd7b69734:/Cydia/MIMEAddress.mm diff --git a/Cydia/MIMEAddress.mm b/Cydia/MIMEAddress.mm index 98497162..c50525af 100644 --- a/Cydia/MIMEAddress.mm +++ b/Cydia/MIMEAddress.mm @@ -1,5 +1,5 @@ /* Cydia - iPhone UIKit Front-End for Debian APT - * Copyright (C) 2008-2012 Jay Freeman (saurik) + * Copyright (C) 2008-2015 Jay Freeman (saurik) */ /* GNU General Public License, Version 3 {{{ */ @@ -23,7 +23,7 @@ #include -#include "CyteKit/PerlCompatibleRegEx.hpp" +#include "CyteKit/RegEx.hpp" @implementation MIMEAddress @@ -61,9 +61,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];