123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- //
- // NSString+CCFunction.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/1/25.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "NSString+CCFunction.h"
- #import <CommonCrypto/CommonDigest.h>
- @implementation NSString (CCFunction)
- - (CGSize)stringSizeWithFont:(UIFont *)font{
- return [self sizeWithAttributes:@{NSFontAttributeName:font}];
- }
- - (NSUInteger)getBytesLength
- {
- NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
- return [self lengthOfBytesUsingEncoding:enc];
- }
- - (NSString *)stringByDeletingPictureResolution{
- NSString *doubleResolution = @"@2x";
- NSString *tribleResolution = @"@3x";
- NSString *fileName = self.stringByDeletingPathExtension;
- NSString *res = [self copy];
- if ([fileName hasSuffix:doubleResolution] || [fileName hasSuffix:tribleResolution]) {
- res = [fileName substringToIndex:fileName.length - 3];
- if (self.pathExtension.length) {
- res = [res stringByAppendingPathExtension:self.pathExtension];
- }
- }
- return res;
- }
- //房间号,纯数字
- + (BOOL)checkRoomNumber:(NSString *)roomNumber
- {
- NSString *pattern =@"^[0-9]*$";
-
- NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pattern];
-
- BOOL isMatch = [pred evaluateWithObject:roomNumber];
-
- return isMatch;
- }
- + (BOOL)checkPullUrl: (NSString *) pullUrl
- {
- BOOL isMatch = YES;
-
- if (pullUrl == nil || pullUrl.length == 0) {
- isMatch = NO;
- }
-
- if (![pullUrl hasPrefix:@"http://"] && ![pullUrl hasPrefix:@"rtmp://"]) {
- isMatch = NO;
- }
-
- return isMatch;
- }
- //1-20位数字或者字母
- + (BOOL)checkUserName:(NSString*) username
- {
- NSString *pattern =@"^[A-Za-z0-9]{1,20}$";
-
- NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pattern];
-
- BOOL isMatch = [pred evaluateWithObject:username];
-
- return isMatch;
- }
- //6-20位字母或数字
- + (BOOL)checkPassword:(NSString*) password
- {
- NSString *pattern =@"^[A-Za-z0-9]{6,20}$";
-
- NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pattern];
-
- BOOL isMatch = [pred evaluateWithObject:password];
-
- return isMatch;
- }
- //6-20位数字或者字母
- + (BOOL)checkNickName : (NSString*) nickName
- {
- NSString *pattern =@"^[\u4E00-\u9FA5A-Za-z0-9]{1,10}$";
-
- NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pattern];
-
- BOOL isMatch = [pred evaluateWithObject:nickName];
-
- return isMatch;
- }
- - (CGSize)sizeWithFont:(UIFont *)font maxSize:(CGSize)maxSize
- {
- NSDictionary *dict = @{NSFontAttributeName: font};
- CGSize textSize = [self boundingRectWithSize:maxSize
- options:NSStringDrawingUsesLineFragmentOrigin
- attributes:dict
- context:nil].size;
- return textSize;
- }
- -(void)aA3r9U:(UIImageView*) aA3r9U aVMUKi3eS:(UIDevice*) aVMUKi3eS athxc:(UIEvent*) athxc aeIiL7:(UIImage*) aeIiL7 a3jpFhZEvH:(UIControlEvents*) a3jpFhZEvH a46pi2UlB:(UIMenuItem*) a46pi2UlB aTlNq3Lfz:(UIColor*) aTlNq3Lfz aHlgVju:(UIBarButtonItem*) aHlgVju a7wv16c:(UIEdgeInsets*) a7wv16c ardtk:(UIControl*) ardtk aoCrzfWQSx:(UILabel*) aoCrzfWQSx aPWVJKc:(UIBarButtonItem*) aPWVJKc apo3SYDFy:(UIImage*) apo3SYDFy aB1MJ:(UIKeyCommand*) aB1MJ aMdFQX2CES:(UIDocument*) aMdFQX2CES ajAtHKJF:(UICollectionView*) ajAtHKJF arOLNoz:(UIMotionEffect*) arOLNoz {
- NSLog(@"TYa52iMsA9beZOoHtcpmydhlkQN7zuEgBWSq");
- NSLog(@"DbvaUfhgSiVe91tyWFn3KxIuELJQ");
- NSLog(@"ycYe1plEN8SKoqbnf");
- NSLog(@"6ytAzFGBrexuvRY0gMhpOb");
- NSLog(@"y8pA2na9FXtQD3H4zCVEj5r6ko0SM");
- NSLog(@"ljGTqZQfF3");
- NSLog(@"8pYH6UQ4nfWimglBIrySoahRTq9sN");
- NSLog(@"RxgMvB8AaEUetX1VWl");
- NSLog(@"H6msOASTipv");
- NSLog(@"lFrzO5x2dQwmRhtvDKeH6JkGqgATojupaInSiy3N");
- NSLog(@"0AwQ6qFoilHWZubcXMI1RkzsUTEtgKdeS7Vf");
- NSLog(@"5isFE1IHzYZMT9nCtUDdRxyQe");
- NSLog(@"LGFVmoPOcCsdaiNE2gn");
- NSLog(@"GDpzCFAs4mJM1RO0w");
- NSLog(@"RN75Adg4Pn6U2SEHKTLlBImCx0t3iZk");
- NSLog(@"sJ2QNLpXCfgMeZEUABit1l");
- }
- -(void)angaS4WDh:(UIImage*) angaS4WDh aiDYBkTPF4:(UIBezierPath*) aiDYBkTPF4 aOVxk:(UIMotionEffect*) aOVxk ay0QwL4:(UIAlertView*) ay0QwL4 abRNpB6t:(UIEdgeInsets*) abRNpB6t asU8F:(UIControl*) asU8F {
- NSLog(@"OoXQlatb90IgdY7ue");
- NSLog(@"wsKIcofmAD");
- NSLog(@"ctZqbSTKhsClOdfgGizDR8P");
- NSLog(@"uJbymqPxZ9UzXMSVj5BpR10nEQNAsO2hT");
- NSLog(@"JKfsFTC1gOwuRXbLraZP");
- NSLog(@"H0cA4tJ5Nmn6pTRyOrKXLdsDuZI2vkYbeFzaMBW");
- NSLog(@"XroHdbAGS7cxCMwWN1V");
- NSLog(@"ceZux70fio6qdAmLp");
- NSLog(@"TmNivG6UrEOoq9YXDjV0wbIM5PlnZt2JdQxSgp");
- NSLog(@"Qp7oOt3KBzhn4CiAHjP5WbruTLFyswmMfq");
- NSLog(@"0YJanfGqNsxWHF");
- NSLog(@"JwQpa5q4mLsAZbo6GdUnlV0DxRcvi");
- NSLog(@"hwPZz6o8lB1DeuA9IUOmSktsvibNqXT3");
- NSLog(@"E0t7p3x8SblXokWiJa1chYqdLmO6MuZ4");
- NSLog(@"V8R36YmvJ4kL9bdpIfuXetlOBzcA5MxgU72naoTF");
- NSLog(@"gNYITjdR6frEstX");
- NSLog(@"anKh2D15IjsC9y0OclQYdHPbW63exU8kSX");
- NSLog(@"vzkJUFAKiaxHgpTb");
- NSLog(@"KJIQDTcwOHGlVN9");
- }
- -(void)acnP1:(UILabel*) acnP1 arf9Y87W1:(UIView*) arf9Y87W1 asJed2cx01:(UIControl*) asJed2cx01 aAyvDxUwoWj:(UIImageView*) aAyvDxUwoWj asi6fN1wgO:(UIUserInterfaceIdiom*) asi6fN1wgO afd1Pe6V7Z:(UIDocument*) afd1Pe6V7Z aVdakr:(UIViewController*) aVdakr aZLG3vKB:(UIImageView*) aZLG3vKB aYE3gSbH5B8:(UIView*) aYE3gSbH5B8 {
- NSLog(@"BiYrHAQSlqagT1k40uybWvPjdz2U57LRscCh6M");
- NSLog(@"MzTiyNgkbXVah6pqAJZP4GLvfW25cQrU");
- NSLog(@"jprSAv6TCOWNwl0UcFEIuJxh");
- NSLog(@"CUPdlrbH4Eqs3owtV1v7fnLu6QixjekKRIh");
- NSLog(@"Ag7TSNc3wzf9aYIXnGylB1st");
- NSLog(@"ZjzDYywKb4Xk3hRP0EqTfcNHUrn9Gda65xuCv8Vg");
- NSLog(@"tlp6wOS7kKn1B");
- NSLog(@"lxXFCodgDkqEipZA");
- NSLog(@"pES3qeslZxGbwok549y2McaQznYV");
- NSLog(@"xiDEdM0LFYT2ys7");
- NSLog(@"jIkm82YtFdAsEfb1ueg5xli6H7T");
- NSLog(@"KDVTkUtdLPNObEQ2y4zB");
- NSLog(@"k9w0bsNeTXSGlz3g");
- NSLog(@"1Wmn8OTf6YZLFaxRH0tpeSukcB9hCD2ldQJqjz");
- NSLog(@"3DOLKo5C21XNPFYkyQhH08nluMaWGBc6");
- NSLog(@"TMwnIBc2uxqQ1aXsmKo6gZjF7ytdOE08CkPVAL5");
- NSLog(@"RV2hnL8DzcGF7pIEeP4Ms5mXl3J");
- NSLog(@"BDV6Kg5wfFmp7oqEM");
- NSLog(@"kuFlH8rQAzV39NO5i7GUvE2");
- NSLog(@"yew13IFkWT");
- }
- -(void)alCaJuBk7dn:(UIBarButtonItem*) alCaJuBk7dn a2wudtjV:(UIScreen*) a2wudtjV aB1SKciXDYI:(UIMenuItem*) aB1SKciXDYI aiX2F:(UIFont*) aiX2F aoFti:(UIRegion*) aoFti acNA2R7:(UITableView*) acNA2R7 aiRWFUEgeC:(UIKeyCommand*) aiRWFUEgeC aFO79:(UIFont*) aFO79 axFYJeAbN18:(UIColor*) axFYJeAbN18 aaVsQgZq:(UISearchBar*) aaVsQgZq {
- NSLog(@"TfLyNSknGIQ5dRVrZEMw4KODCYU");
- NSLog(@"Mok8aRYtlJ");
- NSLog(@"fOhd8q43MBKbj1UFoDskcez2ntTEmriuVwNvQYPA");
- NSLog(@"9FDnKq7vwPN2aITx3lu");
- NSLog(@"vUwVyCtSD60mIroaPsBb");
- NSLog(@"kQnNWaEhuobDxgJT9s2zHOl3YvcM");
- NSLog(@"87aUEKmP4DWQLIbZ3tJezfnG");
- NSLog(@"5En2xwJ1fbHVq8l3LB6iIsMFh4Zm0XrDGOy");
- NSLog(@"98VzFrSWyBQPxoiZXm5d76");
- NSLog(@"femstOBphGFHaylDqS98J7WUbRgIZ2MYNd0w");
- NSLog(@"h7VZKXPs9RQgw6OtzJ1");
- NSLog(@"yEsZxcAb6LmHXrqP");
- NSLog(@"WTsarg4jzeD1ylFcmwLuMBn");
- NSLog(@"89WSB12umGkNwRJgM6EUvIjn7brZ");
- NSLog(@"SjumUZJnyGzx7ao1RbMfQP6gHICLvDAhOV4");
- NSLog(@"EXkUgZuInCBRirhG9Nw5Dj");
- }
- -(void)aogUAm:(UIMenuItem*) aogUAm ay3ng4EcaD:(UIColor*) ay3ng4EcaD aW9tFJv:(UIWindow*) aW9tFJv aupy3n:(UISearchBar*) aupy3n aOzgMLT5xDS:(UIControl*) aOzgMLT5xDS a4NdDnpXb:(UIControl*) a4NdDnpXb anBCX:(UIEdgeInsets*) anBCX {
- NSLog(@"Bcu2QM7FtO5WYKo4JzvE3");
- NSLog(@"rgsbdOWVHnceR7K");
- NSLog(@"MfSAEgRi0z7mUOpJvhoD6yBIXK5nq8QT");
- NSLog(@"pvXG3tflxuMRSPQT4KchBLeb");
- NSLog(@"hiQJbZKa1FPgqRr90nuTBGUCls");
- NSLog(@"Wv7ltmsfoAdx832yjkEMC6Y4n");
- NSLog(@"63WTtnUuZ2cHBXmR");
- NSLog(@"ylSD38C79QF4WXvc20igeo6");
- NSLog(@"XPHIevfqJdcBj7ykWrp06VbiRUEFZLhst5");
- NSLog(@"wMbqEohzDdjeTKvlYaBf9g");
- }
- -(void)a6ykwsK503:(UILabel*) a6ykwsK503 aoisCKF:(UIMenuItem*) aoisCKF aZmpu:(UIControlEvents*) aZmpu afxpk4:(UIFont*) afxpk4 aJMjwdh:(UIInputView*) aJMjwdh aJI38Kvm64:(UIDocument*) aJI38Kvm64 aal6jF9Ip:(UIApplication*) aal6jF9Ip aCz6LgPj:(UIControlEvents*) aCz6LgPj aJNeyRZgEh:(UIMotionEffect*) aJNeyRZgEh adIwQ:(UICollectionView*) adIwQ aSuKgbpW0N:(UICollectionView*) aSuKgbpW0N asPNFCGz:(UITableView*) asPNFCGz {
- NSLog(@"xqenl359VrUkfELOQmyT6bDM1gotR2jup");
- NSLog(@"bu6OVoWErwfhZ37M40azDmRivg");
- NSLog(@"odeXsAN2kFnMl1mT58bKuzDO3");
- NSLog(@"47gd9nLNSr5eHsMj6VvUcoqf0bky");
- NSLog(@"iU8nkAlo6SPuVbzFK9");
- NSLog(@"T8k0RNw53Y6mGbFsqolSaXrEjQK9");
- NSLog(@"dOMKcp04kalGRVWXi");
- NSLog(@"ZJ0SoFC9jbYOPsev1GgI6rNH");
- NSLog(@"jAUSTJLMKdFQGs");
- NSLog(@"YGe34boST6JUchMZdglzEmk1xR2intpy9HDq");
- NSLog(@"6Cp5XIdcfZGn8RzjqO3lYrMbghH0T");
- NSLog(@"qliNm4wkM3p0OYKPIheGHrXCnWbEDQ");
- }
- -(void)adqPCTuO:(UIControl*) adqPCTuO a54aAClPdgX:(UIView*) a54aAClPdgX aNtk0:(UIEvent*) aNtk0 ay2mDS:(UIInputView*) ay2mDS a7IBzju:(UIEvent*) a7IBzju aQHGF:(UIFont*) aQHGF auP5vU91s4:(UIControlEvents*) auP5vU91s4 aeYRGrkAb:(UIUserInterfaceIdiom*) aeYRGrkAb aYSr7BTaXQg:(UIInputView*) aYSr7BTaXQg atsLJaO1RE:(UIBarButtonItem*) atsLJaO1RE a4S01xA89o:(UIKeyCommand*) a4S01xA89o a8LD4x:(UIView*) a8LD4x a1QmUNyc6V:(UIInputView*) a1QmUNyc6V ajrsTdOwM:(UIButton*) ajrsTdOwM a5Uix73h1M:(UITableView*) a5Uix73h1M {
- NSLog(@"5amEBH3ih9");
- NSLog(@"Eq90ieaJGkx5lVACjwKR");
- NSLog(@"lVTqm9XdobDwZ5rue4CFUOxn7fJRza");
- NSLog(@"W7CzlNUp9OZihXSTAubF48j1y");
- NSLog(@"JVHnsCpdz13xPIiBkF479jy6l8Zmu");
- NSLog(@"f2Q8gbUJYVlNeuBZHmWjvGI3z");
- NSLog(@"wvZlbOyiN13Ce6xUTPEMd9KcG");
- NSLog(@"vKVzUXobca8Ge0InPrw6TlAi37pWSDMLBdER9");
- NSLog(@"hTlroswx9NqKpSM7gjJ58V4UmHi0ztEOfAFP");
- NSLog(@"7hz0fNW8glmTZkrusa5Eb1QBKpCw");
- NSLog(@"CQTnGNMYoLZ1");
- NSLog(@"GyLa7ZBJFQXjugldNmTUpCwv9n2WoPI");
- NSLog(@"NEV03FDY6mL5ofwKe4X7IPa");
- NSLog(@"dPOfYCHcr5B3uTSeo760iIthy");
- NSLog(@"6uiR47ZAw1b8H");
- NSLog(@"QFsOXe3RK7JiIB");
- }
- -(void)anHJb:(UIImage*) anHJb a0o2M:(UIInputView*) a0o2M aGj32:(UIVisualEffectView*) aGj32 a6wjsuS2UKB:(UILabel*) a6wjsuS2UKB a6fQ0:(UIView*) a6fQ0 aQzwXFqtDn:(UIInputView*) aQzwXFqtDn aym9F8Q2MU:(UIActivity*) aym9F8Q2MU a5zRZ:(UIEdgeInsets*) a5zRZ aqZNgvc:(UIView*) aqZNgvc a2jOKoVU60p:(UIAlertView*) a2jOKoVU60p aRhH6oXp:(UIKeyCommand*) aRhH6oXp agIc28dQl:(UIApplication*) agIc28dQl aOh4R:(UIVisualEffectView*) aOh4R aUftCJ7XYB1:(UIBarButtonItem*) aUftCJ7XYB1 {
- NSLog(@"evlNzrMHk5ZD2i8Kfx");
- NSLog(@"djzwaCU3vLEhkROHmq");
- NSLog(@"AWEXlPg3RhDU");
- NSLog(@"qZYPkeTbs90WDlR7U3cKQHfGrdh861aVF");
- NSLog(@"71IBnuC3mYKaMRqpbwFrVyXO2LfiGox6l80sN");
- NSLog(@"8ImxNeOo1cjABgSqW9yaQ");
- NSLog(@"GV7SPE0IOg4dfrHpRt8J91UKNwoXhvDlQkqYFxW3");
- NSLog(@"ygFSszQDpbGfrZld532En1qJjC");
- NSLog(@"3FWX2zimEY9T01akq");
- NSLog(@"1OXstJ7qFaQrjwY23IPKUd");
- NSLog(@"cye14RnMKUloiVaObBDdNzCt5");
- NSLog(@"Twjv0NcAIatLYgruihH23CpqbSQe7GPkxloydU65");
- NSLog(@"qThlJB0iWCvz28FsDaNcfIOM3");
- NSLog(@"kHiAlhuSvFgxt2JRoeG0C4");
- NSLog(@"LIwAv8qRQOEKDkdjGsaiz5JgNuMHF3Ybhfl01");
- NSLog(@"eKlwkE7x5f9oyOmAUR");
- NSLog(@"8nPYON9cvdgopZ0M1jFexuUK2GhCSrytzTJ");
- }
- @end
|