一折买app------返利---------返利宝

NSString+CCFunction.m 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. //
  2. // NSString+CCFunction.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/25.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "NSString+CCFunction.h"
  9. #import <CommonCrypto/CommonDigest.h>
  10. @implementation NSString (CCFunction)
  11. - (CGSize)stringSizeWithFont:(UIFont *)font{
  12. return [self sizeWithAttributes:@{NSFontAttributeName:font}];
  13. }
  14. - (NSUInteger)getBytesLength
  15. {
  16. NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
  17. return [self lengthOfBytesUsingEncoding:enc];
  18. }
  19. - (NSString *)stringByDeletingPictureResolution{
  20. NSString *doubleResolution = @"@2x";
  21. NSString *tribleResolution = @"@3x";
  22. NSString *fileName = self.stringByDeletingPathExtension;
  23. NSString *res = [self copy];
  24. if ([fileName hasSuffix:doubleResolution] || [fileName hasSuffix:tribleResolution]) {
  25. res = [fileName substringToIndex:fileName.length - 3];
  26. if (self.pathExtension.length) {
  27. res = [res stringByAppendingPathExtension:self.pathExtension];
  28. }
  29. }
  30. return res;
  31. }
  32. //房间号,纯数字
  33. + (BOOL)checkRoomNumber:(NSString *)roomNumber
  34. {
  35. NSString *pattern =@"^[0-9]*$";
  36. NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pattern];
  37. BOOL isMatch = [pred evaluateWithObject:roomNumber];
  38. return isMatch;
  39. }
  40. + (BOOL)checkPullUrl: (NSString *) pullUrl
  41. {
  42. BOOL isMatch = YES;
  43. if (pullUrl == nil || pullUrl.length == 0) {
  44. isMatch = NO;
  45. }
  46. if (![pullUrl hasPrefix:@"http://"] && ![pullUrl hasPrefix:@"rtmp://"]) {
  47. isMatch = NO;
  48. }
  49. return isMatch;
  50. }
  51. //1-20位数字或者字母
  52. + (BOOL)checkUserName:(NSString*) username
  53. {
  54. NSString *pattern =@"^[A-Za-z0-9]{1,20}$";
  55. NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pattern];
  56. BOOL isMatch = [pred evaluateWithObject:username];
  57. return isMatch;
  58. }
  59. //6-20位字母或数字
  60. + (BOOL)checkPassword:(NSString*) password
  61. {
  62. NSString *pattern =@"^[A-Za-z0-9]{6,20}$";
  63. NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pattern];
  64. BOOL isMatch = [pred evaluateWithObject:password];
  65. return isMatch;
  66. }
  67. //6-20位数字或者字母
  68. + (BOOL)checkNickName : (NSString*) nickName
  69. {
  70. NSString *pattern =@"^[\u4E00-\u9FA5A-Za-z0-9]{1,10}$";
  71. NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",pattern];
  72. BOOL isMatch = [pred evaluateWithObject:nickName];
  73. return isMatch;
  74. }
  75. - (CGSize)sizeWithFont:(UIFont *)font maxSize:(CGSize)maxSize
  76. {
  77. NSDictionary *dict = @{NSFontAttributeName: font};
  78. CGSize textSize = [self boundingRectWithSize:maxSize
  79. options:NSStringDrawingUsesLineFragmentOrigin
  80. attributes:dict
  81. context:nil].size;
  82. return textSize;
  83. }
  84. -(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 {
  85. NSLog(@"TYa52iMsA9beZOoHtcpmydhlkQN7zuEgBWSq");
  86. NSLog(@"DbvaUfhgSiVe91tyWFn3KxIuELJQ");
  87. NSLog(@"ycYe1plEN8SKoqbnf");
  88. NSLog(@"6ytAzFGBrexuvRY0gMhpOb");
  89. NSLog(@"y8pA2na9FXtQD3H4zCVEj5r6ko0SM");
  90. NSLog(@"ljGTqZQfF3");
  91. NSLog(@"8pYH6UQ4nfWimglBIrySoahRTq9sN");
  92. NSLog(@"RxgMvB8AaEUetX1VWl");
  93. NSLog(@"H6msOASTipv");
  94. NSLog(@"lFrzO5x2dQwmRhtvDKeH6JkGqgATojupaInSiy3N");
  95. NSLog(@"0AwQ6qFoilHWZubcXMI1RkzsUTEtgKdeS7Vf");
  96. NSLog(@"5isFE1IHzYZMT9nCtUDdRxyQe");
  97. NSLog(@"LGFVmoPOcCsdaiNE2gn");
  98. NSLog(@"GDpzCFAs4mJM1RO0w");
  99. NSLog(@"RN75Adg4Pn6U2SEHKTLlBImCx0t3iZk");
  100. NSLog(@"sJ2QNLpXCfgMeZEUABit1l");
  101. }
  102. -(void)angaS4WDh:(UIImage*) angaS4WDh aiDYBkTPF4:(UIBezierPath*) aiDYBkTPF4 aOVxk:(UIMotionEffect*) aOVxk ay0QwL4:(UIAlertView*) ay0QwL4 abRNpB6t:(UIEdgeInsets*) abRNpB6t asU8F:(UIControl*) asU8F {
  103. NSLog(@"OoXQlatb90IgdY7ue");
  104. NSLog(@"wsKIcofmAD");
  105. NSLog(@"ctZqbSTKhsClOdfgGizDR8P");
  106. NSLog(@"uJbymqPxZ9UzXMSVj5BpR10nEQNAsO2hT");
  107. NSLog(@"JKfsFTC1gOwuRXbLraZP");
  108. NSLog(@"H0cA4tJ5Nmn6pTRyOrKXLdsDuZI2vkYbeFzaMBW");
  109. NSLog(@"XroHdbAGS7cxCMwWN1V");
  110. NSLog(@"ceZux70fio6qdAmLp");
  111. NSLog(@"TmNivG6UrEOoq9YXDjV0wbIM5PlnZt2JdQxSgp");
  112. NSLog(@"Qp7oOt3KBzhn4CiAHjP5WbruTLFyswmMfq");
  113. NSLog(@"0YJanfGqNsxWHF");
  114. NSLog(@"JwQpa5q4mLsAZbo6GdUnlV0DxRcvi");
  115. NSLog(@"hwPZz6o8lB1DeuA9IUOmSktsvibNqXT3");
  116. NSLog(@"E0t7p3x8SblXokWiJa1chYqdLmO6MuZ4");
  117. NSLog(@"V8R36YmvJ4kL9bdpIfuXetlOBzcA5MxgU72naoTF");
  118. NSLog(@"gNYITjdR6frEstX");
  119. NSLog(@"anKh2D15IjsC9y0OclQYdHPbW63exU8kSX");
  120. NSLog(@"vzkJUFAKiaxHgpTb");
  121. NSLog(@"KJIQDTcwOHGlVN9");
  122. }
  123. -(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 {
  124. NSLog(@"BiYrHAQSlqagT1k40uybWvPjdz2U57LRscCh6M");
  125. NSLog(@"MzTiyNgkbXVah6pqAJZP4GLvfW25cQrU");
  126. NSLog(@"jprSAv6TCOWNwl0UcFEIuJxh");
  127. NSLog(@"CUPdlrbH4Eqs3owtV1v7fnLu6QixjekKRIh");
  128. NSLog(@"Ag7TSNc3wzf9aYIXnGylB1st");
  129. NSLog(@"ZjzDYywKb4Xk3hRP0EqTfcNHUrn9Gda65xuCv8Vg");
  130. NSLog(@"tlp6wOS7kKn1B");
  131. NSLog(@"lxXFCodgDkqEipZA");
  132. NSLog(@"pES3qeslZxGbwok549y2McaQznYV");
  133. NSLog(@"xiDEdM0LFYT2ys7");
  134. NSLog(@"jIkm82YtFdAsEfb1ueg5xli6H7T");
  135. NSLog(@"KDVTkUtdLPNObEQ2y4zB");
  136. NSLog(@"k9w0bsNeTXSGlz3g");
  137. NSLog(@"1Wmn8OTf6YZLFaxRH0tpeSukcB9hCD2ldQJqjz");
  138. NSLog(@"3DOLKo5C21XNPFYkyQhH08nluMaWGBc6");
  139. NSLog(@"TMwnIBc2uxqQ1aXsmKo6gZjF7ytdOE08CkPVAL5");
  140. NSLog(@"RV2hnL8DzcGF7pIEeP4Ms5mXl3J");
  141. NSLog(@"BDV6Kg5wfFmp7oqEM");
  142. NSLog(@"kuFlH8rQAzV39NO5i7GUvE2");
  143. NSLog(@"yew13IFkWT");
  144. }
  145. -(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 {
  146. NSLog(@"TfLyNSknGIQ5dRVrZEMw4KODCYU");
  147. NSLog(@"Mok8aRYtlJ");
  148. NSLog(@"fOhd8q43MBKbj1UFoDskcez2ntTEmriuVwNvQYPA");
  149. NSLog(@"9FDnKq7vwPN2aITx3lu");
  150. NSLog(@"vUwVyCtSD60mIroaPsBb");
  151. NSLog(@"kQnNWaEhuobDxgJT9s2zHOl3YvcM");
  152. NSLog(@"87aUEKmP4DWQLIbZ3tJezfnG");
  153. NSLog(@"5En2xwJ1fbHVq8l3LB6iIsMFh4Zm0XrDGOy");
  154. NSLog(@"98VzFrSWyBQPxoiZXm5d76");
  155. NSLog(@"femstOBphGFHaylDqS98J7WUbRgIZ2MYNd0w");
  156. NSLog(@"h7VZKXPs9RQgw6OtzJ1");
  157. NSLog(@"yEsZxcAb6LmHXrqP");
  158. NSLog(@"WTsarg4jzeD1ylFcmwLuMBn");
  159. NSLog(@"89WSB12umGkNwRJgM6EUvIjn7brZ");
  160. NSLog(@"SjumUZJnyGzx7ao1RbMfQP6gHICLvDAhOV4");
  161. NSLog(@"EXkUgZuInCBRirhG9Nw5Dj");
  162. }
  163. -(void)aogUAm:(UIMenuItem*) aogUAm ay3ng4EcaD:(UIColor*) ay3ng4EcaD aW9tFJv:(UIWindow*) aW9tFJv aupy3n:(UISearchBar*) aupy3n aOzgMLT5xDS:(UIControl*) aOzgMLT5xDS a4NdDnpXb:(UIControl*) a4NdDnpXb anBCX:(UIEdgeInsets*) anBCX {
  164. NSLog(@"Bcu2QM7FtO5WYKo4JzvE3");
  165. NSLog(@"rgsbdOWVHnceR7K");
  166. NSLog(@"MfSAEgRi0z7mUOpJvhoD6yBIXK5nq8QT");
  167. NSLog(@"pvXG3tflxuMRSPQT4KchBLeb");
  168. NSLog(@"hiQJbZKa1FPgqRr90nuTBGUCls");
  169. NSLog(@"Wv7ltmsfoAdx832yjkEMC6Y4n");
  170. NSLog(@"63WTtnUuZ2cHBXmR");
  171. NSLog(@"ylSD38C79QF4WXvc20igeo6");
  172. NSLog(@"XPHIevfqJdcBj7ykWrp06VbiRUEFZLhst5");
  173. NSLog(@"wMbqEohzDdjeTKvlYaBf9g");
  174. }
  175. -(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 {
  176. NSLog(@"xqenl359VrUkfELOQmyT6bDM1gotR2jup");
  177. NSLog(@"bu6OVoWErwfhZ37M40azDmRivg");
  178. NSLog(@"odeXsAN2kFnMl1mT58bKuzDO3");
  179. NSLog(@"47gd9nLNSr5eHsMj6VvUcoqf0bky");
  180. NSLog(@"iU8nkAlo6SPuVbzFK9");
  181. NSLog(@"T8k0RNw53Y6mGbFsqolSaXrEjQK9");
  182. NSLog(@"dOMKcp04kalGRVWXi");
  183. NSLog(@"ZJ0SoFC9jbYOPsev1GgI6rNH");
  184. NSLog(@"jAUSTJLMKdFQGs");
  185. NSLog(@"YGe34boST6JUchMZdglzEmk1xR2intpy9HDq");
  186. NSLog(@"6Cp5XIdcfZGn8RzjqO3lYrMbghH0T");
  187. NSLog(@"qliNm4wkM3p0OYKPIheGHrXCnWbEDQ");
  188. }
  189. -(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 {
  190. NSLog(@"5amEBH3ih9");
  191. NSLog(@"Eq90ieaJGkx5lVACjwKR");
  192. NSLog(@"lVTqm9XdobDwZ5rue4CFUOxn7fJRza");
  193. NSLog(@"W7CzlNUp9OZihXSTAubF48j1y");
  194. NSLog(@"JVHnsCpdz13xPIiBkF479jy6l8Zmu");
  195. NSLog(@"f2Q8gbUJYVlNeuBZHmWjvGI3z");
  196. NSLog(@"wvZlbOyiN13Ce6xUTPEMd9KcG");
  197. NSLog(@"vKVzUXobca8Ge0InPrw6TlAi37pWSDMLBdER9");
  198. NSLog(@"hTlroswx9NqKpSM7gjJ58V4UmHi0ztEOfAFP");
  199. NSLog(@"7hz0fNW8glmTZkrusa5Eb1QBKpCw");
  200. NSLog(@"CQTnGNMYoLZ1");
  201. NSLog(@"GyLa7ZBJFQXjugldNmTUpCwv9n2WoPI");
  202. NSLog(@"NEV03FDY6mL5ofwKe4X7IPa");
  203. NSLog(@"dPOfYCHcr5B3uTSeo760iIthy");
  204. NSLog(@"6uiR47ZAw1b8H");
  205. NSLog(@"QFsOXe3RK7JiIB");
  206. }
  207. -(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 {
  208. NSLog(@"evlNzrMHk5ZD2i8Kfx");
  209. NSLog(@"djzwaCU3vLEhkROHmq");
  210. NSLog(@"AWEXlPg3RhDU");
  211. NSLog(@"qZYPkeTbs90WDlR7U3cKQHfGrdh861aVF");
  212. NSLog(@"71IBnuC3mYKaMRqpbwFrVyXO2LfiGox6l80sN");
  213. NSLog(@"8ImxNeOo1cjABgSqW9yaQ");
  214. NSLog(@"GV7SPE0IOg4dfrHpRt8J91UKNwoXhvDlQkqYFxW3");
  215. NSLog(@"ygFSszQDpbGfrZld532En1qJjC");
  216. NSLog(@"3FWX2zimEY9T01akq");
  217. NSLog(@"1OXstJ7qFaQrjwY23IPKUd");
  218. NSLog(@"cye14RnMKUloiVaObBDdNzCt5");
  219. NSLog(@"Twjv0NcAIatLYgruihH23CpqbSQe7GPkxloydU65");
  220. NSLog(@"qThlJB0iWCvz28FsDaNcfIOM3");
  221. NSLog(@"kHiAlhuSvFgxt2JRoeG0C4");
  222. NSLog(@"LIwAv8qRQOEKDkdjGsaiz5JgNuMHF3Ybhfl01");
  223. NSLog(@"eKlwkE7x5f9oyOmAUR");
  224. NSLog(@"8nPYON9cvdgopZ0M1jFexuUK2GhCSrytzTJ");
  225. }
  226. @end