Browse Source

fileManager

zzb 4 years ago
parent
commit
a0c78b76fc
31 changed files with 858 additions and 240 deletions
  1. BIN
      01.jpg
  2. BIN
      02.jpg
  3. BIN
      03.jpg
  4. 16 0
      Collection/NSMutableArray+ZZEx.h
  5. 12 0
      Collection/NSMutableArray+ZZEx.m
  6. 16 0
      Date/NSDate+ZZEx.h
  7. 12 0
      Date/NSDate+ZZEx.m
  8. 339 175
      Example/Pods/Pods.xcodeproj/project.pbxproj
  9. 11 0
      Example/Pods/Target Support Files/ZZFoundation/ZZFoundation-umbrella.h
  10. 30 0
      Example/Tests/NSDate+ZZExTest.m
  11. 45 0
      Example/Tests/NSString+ZZExTest.m
  12. 43 0
      Example/Tests/NSString+ZZPathTests.m
  13. 28 0
      Example/Tests/NSString+ZZRangeTest.m
  14. 32 0
      Example/Tests/NSString+ZZRegexTest.m
  15. 0 44
      Example/Tests/Tests.m
  16. 28 4
      Example/ZZFoundation.xcodeproj/project.pbxproj
  17. 16 13
      Example/ZZFoundation.xcodeproj/xcshareddata/xcschemes/ZZFoundation-Example.xcscheme
  18. 1 2
      Example/ZZFoundation/ZZAppDelegate.m
  19. 16 0
      FileManager/NSFileManager+ZZEx.h
  20. 12 0
      FileManager/NSFileManager+ZZEx.m
  21. 12 0
      ZZFoundation/Classes/Date/ZZFoundation_Date.h
  22. 7 1
      ZZFoundation/Classes/String/Path/NSString+ZZPath.h
  23. 1 1
      ZZFoundation/Classes/String/Path/NSString+ZZPath.m
  24. 44 0
      ZZFoundation/Classes/String/NSString+ZZEx.h
  25. 28 0
      ZZFoundation/Classes/String/NSString+ZZEx.m
  26. 21 0
      ZZFoundation/Classes/String/Security/ZZSecurity.h
  27. 12 0
      ZZFoundation/Classes/String/Security/ZZSecurity.m
  28. 18 0
      ZZFoundation/Classes/String/Size/NSString+ZZRect.h
  29. 29 0
      ZZFoundation/Classes/String/Size/NSString+ZZRect.m
  30. 17 0
      ZZFoundation/Classes/String/StringRange/NSString+ZZRange.h
  31. 12 0
      ZZFoundation/Classes/String/StringRange/NSString+ZZRange.m

BIN
01.jpg


BIN
02.jpg


BIN
03.jpg


+ 16 - 0
Collection/NSMutableArray+ZZEx.h

@@ -0,0 +1,16 @@
+//
+//  NSMutableArray+ZZEx.h
+//  Kiwi
+//
+//  Created by Max on 2020/12/28.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NSMutableArray (ZZEx)
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 12 - 0
Collection/NSMutableArray+ZZEx.m

@@ -0,0 +1,12 @@
+//
+//  NSMutableArray+ZZEx.m
+//  Kiwi
+//
+//  Created by Max on 2020/12/28.
+//
+
+#import "NSMutableArray+ZZEx.h"
+
+@implementation NSMutableArray (ZZEx)
+
+@end

+ 16 - 0
Date/NSDate+ZZEx.h

@@ -0,0 +1,16 @@
+//
+//  NSDate+ZZEx.h
+//  Kiwi
+//
+//  Created by Max on 2020/12/29.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NSDate (ZZEx)
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 12 - 0
Date/NSDate+ZZEx.m

@@ -0,0 +1,12 @@
+//
+//  NSDate+ZZEx.m
+//  Kiwi
+//
+//  Created by Max on 2020/12/29.
+//
+
+#import "NSDate+ZZEx.h"
+
+@implementation NSDate (ZZEx)
+
+@end

File diff suppressed because it is too large
+ 339 - 175
Example/Pods/Pods.xcodeproj/project.pbxproj


+ 11 - 0
Example/Pods/Target Support Files/ZZFoundation/ZZFoundation-umbrella.h

@@ -10,7 +10,18 @@
 #endif
 #endif
 
+#import "NSArray+ZZEx.h"
+#import "NSMutableArray+ZZEx.h"
+#import "NSDate+ZZEx.h"
+#import "ZZFoundation_Date.h"
+#import "NSObjec+PropertiesVarMethod.h"
+#import "NSObject+ZZSwizzle.h"
 #import "NSString+ZZPath.h"
+#import "NSString+ZZEx.h"
+#import "NSString+ZZRegex.h"
+#import "ZZSecurity.h"
+#import "NSString+ZZRect.h"
+#import "NSString+ZZRange.h"
 #import "ZZFoundation_String.h"
 #import "ZZFoundation.h"
 

+ 30 - 0
Example/Tests/NSDate+ZZExTest.m

@@ -0,0 +1,30 @@
+//
+//  NSDate+ZZExTest.m
+//  ZZFoundation_Tests
+//
+//  Created by Max on 2020/12/29.
+//  Copyright © 2020 bymiracles@163.com. All rights reserved.
+//
+
+#import "Kiwi.h"
+#import <ZZFoundation.h>
+
+SPEC_BEGIN(DateEx)
+NSDate * today = [NSDate date];
+NSDate * timeZoneCurrent = [[NSDate date] addTimeZone];
+
+describe(@"week", ^{
+    it(@"today should ", ^{
+        [[theValue([today weekOfMonth]) should] equal:theValue(5)];
+    });
+    it(@"time should be correct", ^{
+        NSDateFormatter *format = [[NSDateFormatter alloc] init];
+        [format setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+        NSString * str = [today stringWithDateStyle:NSDateFormatterFullStyle timeStyle:NSDateFormatterFullStyle];
+        NSString * str1 = [format stringFromDate:timeZoneCurrent];
+        NSLog(@"time now is:%@",str);
+        NSLog(@"timeZoneCurrent now is:%@",str1);
+    });
+});
+
+SPEC_END

+ 45 - 0
Example/Tests/NSString+ZZExTest.m

@@ -0,0 +1,45 @@
+//
+//  NSString+ZZExTest.m
+//  ZZFoundation_Tests
+//
+//  Created by Max on 2020/12/28.
+//  Copyright © 2020 bymiracles@163.com. All rights reserved.
+//
+
+#import "Kiwi.h"
+#import <ZZFoundation.h>
+
+SPEC_BEGIN(StringEx)
+NSString * emptyStr = @"";
+NSString * chinese = @"你莫走";
+NSString * chineseCharacter = @"你好,李银河!";
+NSString * num = @"1232131321";
+
+NSString * characterNum = @"Zz1232131321";
+
+describe(@"split", ^{
+    it(@"emptyStr should have 1 component", ^{
+        [[[emptyStr ZZSplit:@"3"] should] haveCountOf:1];
+    });
+    it(@"chinese should have 2 component", ^{
+        [[[chinese ZZSplit:@"走"] should] haveCountOf:2];
+    });
+    it(@"chineseCharacter should have 2 component", ^{
+        [[[chineseCharacter ZZSplit:@","] should] haveCountOf:2];
+    });
+    it(@"num should have 3 component", ^{
+        [[[num ZZSplit:@"3"] should] haveCountOf:4];
+    });
+});
+
+describe(@"replace", ^{
+    it(@"emptyStr search with someone should return itself", ^{
+        [[[emptyStr ZZReplace:@"" with:@" "] should] equal:emptyStr];
+    });
+
+    it(@"1 in num with $", ^{
+        [[[num ZZReplace:@"1" with:@"$"] should] equal:@"$232$3$32$"];
+    });
+});
+
+SPEC_END

+ 43 - 0
Example/Tests/NSString+ZZPathTests.m

@@ -0,0 +1,43 @@
+//
+//  ZZFoundationTests.m
+//  ZZFoundationTests
+//
+//  Created by bymiracles@163.com on 12/24/2020.
+//  Copyright (c) 2020 bymiracles@163.com. All rights reserved.
+//
+
+// https://github.com/kiwi-bdd/Kiwi
+
+#import <Kiwi/Kiwi.h>
+#import <ZZFoundation.h>
+
+SPEC_BEGIN(StringPath)
+
+describe(@"StringEx", ^{
+
+  context(@"of cache", ^{
+      __block id value = nil;
+      beforeEach(^{
+          value = [@"fileName" ZZCacheDir];
+      });
+      
+      afterEach(^{
+          value = nil;
+      });
+      
+      it(@"should not ne nil", ^{
+          [[value shouldNot] beNil];
+      });
+
+      it(@"should contain \"fileName\"", ^{
+          [[[value lastPathComponent]should] equal:@"fileName"];
+      });
+      
+      
+    
+  });
+  
+});
+
+SPEC_END
+

+ 28 - 0
Example/Tests/NSString+ZZRangeTest.m

@@ -0,0 +1,28 @@
+//
+//  NSString+ZZRangeTest.m
+//  ZZFoundation_Tests
+//
+//  Created by Max on 2020/12/25.
+//  Copyright © 2020 bymiracles@163.com. All rights reserved.
+//
+
+#import "Kiwi.h"
+#import <ZZFoundation.h>
+
+SPEC_BEGIN(StringRange)
+
+describe(@"range", ^{
+    __block id value = nil;
+    beforeEach(^{
+        value = [@"~_~../~_0kdahj1hyqhjdanslkdhaojkshdojk_~" ZZRangeOfSubString:@"~_"];
+    });
+    afterEach(^{
+        value = nil;
+    });
+    it(@"should have 2 element", ^{
+        NSLog(@"%@",value);
+        [[value should] haveCountOf:2];
+    });
+});
+
+SPEC_END

+ 32 - 0
Example/Tests/NSString+ZZRegexTest.m

@@ -0,0 +1,32 @@
+//
+//  NSString+ZZRegex.m
+//  ZZFoundation_Tests
+//
+//  Created by Max on 2020/12/25.
+//  Copyright © 2020 bymiracles@163.com. All rights reserved.
+//
+
+#import "Kiwi.h"
+#import <ZZFoundation.h>
+
+SPEC_BEGIN(StringRegex)
+NSString * chinese = @"你莫走";
+NSString * chineseCharacter = @"你好,李银河!";
+NSString * num = @"1232131321";
+NSString * characterNum = @"Zz1232131321";
+
+describe(@"Chinese regex", ^{
+    it(@"chineseStr should be all Chinese", ^{
+        [[theValue([chinese ZZCheckAllChinese]) should] beTrue];
+    });
+    
+    it(@"chineseCharacterStr should not be all Chinese", ^{
+        [[theValue([chineseCharacter ZZCheckAllChinese]) should] beFalse];
+    });
+    
+    it(@"characterNum should not be all Chinese", ^{
+        [[theValue([characterNum ZZCheckAllChinese]) should] beFalse];
+    });
+});
+
+SPEC_END

+ 0 - 44
Example/Tests/Tests.m

@@ -1,44 +0,0 @@
-//
-//  ZZFoundationTests.m
-//  ZZFoundationTests
-//
-//  Created by bymiracles@163.com on 12/24/2020.
-//  Copyright (c) 2020 bymiracles@163.com. All rights reserved.
-//
-
-// https://github.com/kiwi-bdd/Kiwi
-
-#import <Kiwi/Kiwi.h>
-#import "NSString+ZZPath.h"
-
-SPEC_BEGIN(StringTest)
-
-describe(@"file directory", ^{
-
-  context(@"of cache", ^{
-      id value = [@"fileName" ZZCacheDir];
-      it(@"should be string class", ^{
-          [[value should] beKindOfClass:[NSString class]];
-      });
-
-      it(@"should has suffix fileName", ^{
-          [[value should] containString:@"/Library/Caches/fileName"];
-      });
-    
-  });
-
-  context(@"will pass", ^{
-    
-      it(@"can do maths", ^{
-        [[@1 should] beLessThan:@23];
-      });
-    
-      it(@"can read", ^{
-          [[@"team" shouldNot] containString:@"I"];
-      });  
-  });
-  
-});
-
-SPEC_END
-

+ 28 - 4
Example/ZZFoundation.xcodeproj/project.pbxproj

@@ -8,6 +8,10 @@
 
 /* Begin PBXBuildFile section */
 		2B1A4D4147F0AF49D70496DC /* Pods_ZZFoundation_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395307505955BBCF6A4A24D /* Pods_ZZFoundation_Tests.framework */; };
+		50543AD9259A18EB00E96479 /* NSString+ZZExTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 50543AD8259A18EB00E96479 /* NSString+ZZExTest.m */; };
+		505478422596352F00EB1172 /* NSString+ZZRangeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 505478412596352F00EB1172 /* NSString+ZZRangeTest.m */; };
+		5054784D25963E9A00EB1172 /* NSString+ZZRegexTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5054784C25963E9A00EB1172 /* NSString+ZZRegexTest.m */; };
+		50563647259B12FC004C7FCF /* NSDate+ZZExTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 50563646259B12FC004C7FCF /* NSDate+ZZExTest.m */; };
 		6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
 		6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
 		6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
@@ -20,7 +24,7 @@
 		6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
 		6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
 		6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
-		6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
+		6003F5BC195388D20070C39A /* NSString+ZZPathTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* NSString+ZZPathTests.m */; };
 		64B7830872AEE1932A0945C8 /* Pods_ZZFoundation_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 742D2D17DA601F8B16B6E9FA /* Pods_ZZFoundation_Example.framework */; };
 		71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
 		873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
@@ -39,6 +43,10 @@
 /* Begin PBXFileReference section */
 		0395307505955BBCF6A4A24D /* Pods_ZZFoundation_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZZFoundation_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		43EAEC7ADAA0051551EC0B07 /* Pods-ZZFoundation_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZZFoundation_Example.debug.xcconfig"; path = "Target Support Files/Pods-ZZFoundation_Example/Pods-ZZFoundation_Example.debug.xcconfig"; sourceTree = "<group>"; };
+		50543AD8259A18EB00E96479 /* NSString+ZZExTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+ZZExTest.m"; sourceTree = "<group>"; };
+		505478412596352F00EB1172 /* NSString+ZZRangeTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+ZZRangeTest.m"; sourceTree = "<group>"; };
+		5054784C25963E9A00EB1172 /* NSString+ZZRegexTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+ZZRegexTest.m"; sourceTree = "<group>"; };
+		50563646259B12FC004C7FCF /* NSDate+ZZExTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSDate+ZZExTest.m"; sourceTree = "<group>"; };
 		6003F58A195388D20070C39A /* ZZFoundation_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZZFoundation_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
 		6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
@@ -56,7 +64,7 @@
 		6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
 		6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
 		6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
+		6003F5BB195388D20070C39A /* NSString+ZZPathTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+ZZPathTests.m"; sourceTree = "<group>"; };
 		606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
 		71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		742D2D17DA601F8B16B6E9FA /* Pods_ZZFoundation_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZZFoundation_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -155,7 +163,11 @@
 		6003F5B5195388D20070C39A /* Tests */ = {
 			isa = PBXGroup;
 			children = (
-				6003F5BB195388D20070C39A /* Tests.m */,
+				6003F5BB195388D20070C39A /* NSString+ZZPathTests.m */,
+				505478412596352F00EB1172 /* NSString+ZZRangeTest.m */,
+				5054784C25963E9A00EB1172 /* NSString+ZZRegexTest.m */,
+				50543AD8259A18EB00E96479 /* NSString+ZZExTest.m */,
+				50563646259B12FC004C7FCF /* NSDate+ZZExTest.m */,
 				6003F5B6195388D20070C39A /* Supporting Files */,
 			);
 			path = Tests;
@@ -234,7 +246,11 @@
 				LastUpgradeCheck = 0720;
 				ORGANIZATIONNAME = "bymiracles@163.com";
 				TargetAttributes = {
+					6003F589195388D20070C39A = {
+						DevelopmentTeam = 977DUNW73S;
+					};
 					6003F5AD195388D20070C39A = {
+						DevelopmentTeam = 977DUNW73S;
 						TestTargetID = 6003F589195388D20070C39A;
 					};
 				};
@@ -381,7 +397,11 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				6003F5BC195388D20070C39A /* Tests.m in Sources */,
+				6003F5BC195388D20070C39A /* NSString+ZZPathTests.m in Sources */,
+				505478422596352F00EB1172 /* NSString+ZZRangeTest.m in Sources */,
+				50563647259B12FC004C7FCF /* NSDate+ZZExTest.m in Sources */,
+				50543AD9259A18EB00E96479 /* NSString+ZZExTest.m in Sources */,
+				5054784D25963E9A00EB1172 /* NSString+ZZRegexTest.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -501,6 +521,7 @@
 			baseConfigurationReference = 43EAEC7ADAA0051551EC0B07 /* Pods-ZZFoundation_Example.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				DEVELOPMENT_TEAM = 977DUNW73S;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "ZZFoundation/ZZFoundation-Prefix.pch";
 				INFOPLIST_FILE = "ZZFoundation/ZZFoundation-Info.plist";
@@ -517,6 +538,7 @@
 			baseConfigurationReference = D21B953AED72739FA73F9573 /* Pods-ZZFoundation_Example.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				DEVELOPMENT_TEAM = 977DUNW73S;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "ZZFoundation/ZZFoundation-Prefix.pch";
 				INFOPLIST_FILE = "ZZFoundation/ZZFoundation-Info.plist";
@@ -533,6 +555,7 @@
 			baseConfigurationReference = B1FA23B46676C8044117B258 /* Pods-ZZFoundation_Tests.debug.xcconfig */;
 			buildSettings = {
 				BUNDLE_LOADER = "$(TEST_HOST)";
+				DEVELOPMENT_TEAM = 977DUNW73S;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(PLATFORM_DIR)/Developer/Library/Frameworks",
 					"$(inherited)",
@@ -558,6 +581,7 @@
 			baseConfigurationReference = CFB9F0CDCDE27F996E0D538E /* Pods-ZZFoundation_Tests.release.xcconfig */;
 			buildSettings = {
 				BUNDLE_LOADER = "$(TEST_HOST)";
+				DEVELOPMENT_TEAM = 977DUNW73S;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(PLATFORM_DIR)/Developer/Library/Frameworks",
 					"$(inherited)",

+ 16 - 13
Example/ZZFoundation.xcodeproj/xcshareddata/xcschemes/ZZFoundation-Example.xcscheme

@@ -27,6 +27,15 @@
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "6003F589195388D20070C39A"
+            BuildableName = "ZZFoundation_Example.app"
+            BlueprintName = "ZZFoundation_Example"
+            ReferencedContainer = "container:ZZFoundation.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
       <Testables>
          <TestableReference
             skipped = "NO">
@@ -39,17 +48,6 @@
             </BuildableReference>
          </TestableReference>
       </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "6003F589195388D20070C39A"
-            BuildableName = "ZZFoundation_Example.app"
-            BlueprintName = "ZZFoundation_Example"
-            ReferencedContainer = "container:ZZFoundation.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
    </TestAction>
    <LaunchAction
       buildConfiguration = "Debug"
@@ -71,8 +69,13 @@
             ReferencedContainer = "container:ZZFoundation.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
-      <AdditionalOptions>
-      </AdditionalOptions>
+      <EnvironmentVariables>
+         <EnvironmentVariable
+            key = "OS_ACTIVITY_MODE"
+            value = "disable"
+            isEnabled = "NO">
+         </EnvironmentVariable>
+      </EnvironmentVariables>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "Release"

+ 1 - 2
Example/ZZFoundation/ZZAppDelegate.m

@@ -7,13 +7,12 @@
 //
 
 #import "ZZAppDelegate.h"
-#import "ZZFoundation.h"
+#import <ZZFoundation.h>
 @implementation ZZAppDelegate
 
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 {
     // Override point for customization after application launch.
-    
     return YES;
 }
 

+ 16 - 0
FileManager/NSFileManager+ZZEx.h

@@ -0,0 +1,16 @@
+//
+//  NSFileManager+ZZEx.h
+//  Kiwi
+//
+//  Created by Max on 2020/12/29.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NSFileManager (ZZEx)
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 12 - 0
FileManager/NSFileManager+ZZEx.m

@@ -0,0 +1,12 @@
+//
+//  NSFileManager+ZZEx.m
+//  Kiwi
+//
+//  Created by Max on 2020/12/29.
+//
+
+#import "NSFileManager+ZZEx.h"
+
+@implementation NSFileManager (ZZEx)
+
+@end

+ 12 - 0
ZZFoundation/Classes/Date/ZZFoundation_Date.h

@@ -0,0 +1,12 @@
+//
+//  ZZFoundation_Date.h
+//  Pods
+//
+//  Created by Max on 2020/12/29.
+//
+
+#ifndef ZZFoundation_Date_h
+#define ZZFoundation_Date_h
+
+
+#endif /* ZZFoundation_Date_h */

+ 7 - 1
ZZFoundation/Classes/String/Path/NSString+ZZPath.h

@@ -2,14 +2,20 @@
 //  NSString+ZZPath.h
 //  lock
 //
-//  Created by bym on 2018/5/2.
+//  Created by ZZBB on 2018/5/2.
 //  Copyright © 2018年 BYM. All rights reserved.
 //
 
 #import <Foundation/Foundation.h>
 
 @interface NSString (ZZPath)
+
+/// 拼接成cache目录
 - (instancetype)ZZCacheDir;
+
+/// 拼接成Document目录
 - (instancetype)ZZDocDir;
+
+/// 拼接成Temp目录
 - (instancetype)ZZTempDir;
 @end

+ 1 - 1
ZZFoundation/Classes/String/Path/NSString+ZZPath.m

@@ -2,7 +2,7 @@
 //  NSString+Path.m
 //  lock
 //
-//  Created by bym on 2018/5/2.
+//  Created by ZZBB on 2018/5/2.
 //  Copyright © 2018年 BYM. All rights reserved.
 //
 

+ 44 - 0
ZZFoundation/Classes/String/NSString+ZZEx.h

@@ -0,0 +1,44 @@
+//
+//  NSString+ZZEx.h
+//  Kiwi
+//
+//  Created by Max on 2020/12/28.
+//
+
+#import <Foundation/Foundation.h>
+#import <NSString+ZZRange.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NSString (ZZEx)
+
+FOUNDATION_EXPORT NSString * ZZString(NSString *format, ...);
+
+
+/// 提取字符串的片断,返回index开始到最后
+/// @param index 开始的下标
+-(NSString *)ZZSlice:(NSInteger)index;
+
+/// 字符串切割,返回从star到end范围内的字符串
+/// @param star 开始下标
+/// @param end 结束下标
+-(NSString *)ZZSlice:(NSInteger)star end:(NSInteger)end;
+
+/// 字符串切割,返回从star开始length范围内的字符串
+/// @param star 开始下标
+/// @param length 子字符串的长度
+-(NSString *)ZZSlice:(NSInteger)star length:(NSInteger)length;
+
+
+/// 切割字符串
+/// @param separator 从该参数指定的地方分割
+-(NSArray *)ZZSplit:(NSString *)separator;
+
+
+/// 替换字符串
+/// @param aStr 匹配的字符串
+/// @param bStr 替换的字符串
+-(NSString *)ZZReplace:(NSString *)aStr with:(NSString *)bStr;
+@end
+
+NS_ASSUME_NONNULL_END

+ 28 - 0
ZZFoundation/Classes/String/NSString+ZZEx.m

@@ -0,0 +1,28 @@
+//
+//  NSString+Ex.m
+//  Kiwi
+//
+//  Created by Max on 2020/12/28.
+//
+
+#import "NSString+Ex.h"
+
+@implementation NSString (Ex)
+
+-(NSString *)ZZSlice:(NSInteger)star{
+    return [self substringFromIndex:star];
+};
+
+-(NSString *)ZZSlice:(NSInteger)star end:(NSInteger)end{
+    NSRange range = NSMakeRange(star, end);
+    return [self substringWithRange:range];
+};
+
+-(NSString *)ZZSlice:(NSInteger)star length:(NSInteger)length{
+    return [self ZZSlice:star end:star + length];
+}
+
+-(NSString *)ZZReplace:(NSString *)replaceStr{
+    [self stringByReplacingCharactersInRange:<#(NSRange)#> withString:<#(nonnull NSString *)#>]
+}
+@end

+ 21 - 0
ZZFoundation/Classes/String/Security/ZZSecurity.h

@@ -0,0 +1,21 @@
+//
+//  ZZSecurity.h
+//  Pods
+//
+//  Created by Max on 2020/12/27.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ZZSecurity : NSString
+@property(nonatomic,assign) BOOL isSecurity;
+@property(nonatomic,copy) NSString *securityString;
+
+-(NSString *)security;
+-(NSString *)securityWithRange:(NSRange *)range;
+-(NSString *)securityToggle;
+@end
+
+NS_ASSUME_NONNULL_END

+ 12 - 0
ZZFoundation/Classes/String/Security/ZZSecurity.m

@@ -0,0 +1,12 @@
+//
+//  ZZSecurity.m
+//  Pods
+//
+//  Created by Max on 2020/12/27.
+//
+
+#import "ZZSecurity.h"
+
+@implementation ZZSecurity
+
+@end

+ 18 - 0
ZZFoundation/Classes/String/Size/NSString+ZZRect.h

@@ -0,0 +1,18 @@
+//
+//  NSString+ZZSize.h
+//  ruibeikang
+//
+//  Created by Apple on 23/7/19.
+//  Copyright © 2019年 Qzz. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NSString (ZZSize)
+-(CGFloat (^)(CGFloat width,UIFont *font))ZZHeigh;
+-(CGFloat (^)(CGFloat heigh,UIFont *font))ZZWidth;
+@end
+
+NS_ASSUME_NONNULL_END

+ 29 - 0
ZZFoundation/Classes/String/Size/NSString+ZZRect.m

@@ -0,0 +1,29 @@
+//
+//  NSString+ZZSize.m
+//  ruibeikang
+//
+//  Created by Apple on 23/7/19.
+//  Copyright © 2019年 Qzz. All rights reserved.
+//
+
+#import "NSString+ZZSize.h"
+
+@implementation NSString (ZZSize)
+
+-(CGFloat (^)(CGFloat width,UIFont *font))ZZHeigh{
+    return ^(CGFloat width,UIFont *font){
+        NSDictionary *attribute = @{NSFontAttributeName: font};
+        CGSize  size = [self boundingRectWithSize:CGSizeMake(width, MAXFLOAT)  options:NSStringDrawingUsesLineFragmentOrigin  |NSStringDrawingUsesFontLeading |NSStringDrawingTruncatesLastVisibleLine attributes:attribute context:nil].size;
+        return size.height;
+    };
+}
+
+-(CGFloat (^)(CGFloat heigh,UIFont *font))ZZWidth{
+    return ^(CGFloat heigh,UIFont *font){
+        NSDictionary *attribute = @{NSFontAttributeName: font};
+        CGSize  size = [self boundingRectWithSize:CGSizeMake(heigh,MAXFLOAT)  options:NSStringDrawingUsesLineFragmentOrigin  |NSStringDrawingUsesFontLeading |NSStringDrawingTruncatesLastVisibleLine attributes:attribute context:nil].size;
+        return size.width;
+    };
+}
+
+@end

+ 17 - 0
ZZFoundation/Classes/String/StringRange/NSString+ZZRange.h

@@ -0,0 +1,17 @@
+//
+//  NSString+ZZRange.h
+//  Kiwi
+//
+//  Created by Max on 2020/12/25.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NSString (ZZRange)
+/// 遍历字符串返回子字符串range的数组集合
+- (NSArray*)ZZRangeOfSubString:(NSString*)subStr;
+@end
+
+NS_ASSUME_NONNULL_END

+ 12 - 0
ZZFoundation/Classes/String/StringRange/NSString+ZZRange.m

@@ -0,0 +1,12 @@
+//
+//  NSString+ZZRange.m
+//  Kiwi
+//
+//  Created by Max on 2020/12/25.
+//
+
+#import "NSString+ZZRange.h"
+
+@implementation NSString (ZZRange)
+
+@end