mirror of
https://github.com/Sunnyyoung/WeChatTweak-macOS.git
synced 2026-07-29 06:24:31 +08:00
Update project settings
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// NSBundle+WeChatTweak.h
|
||||
// WeChatTweak
|
||||
//
|
||||
// Created by Sunnyyoung on 2017/8/12.
|
||||
// Copyright © 2017年 Sunnyyoung. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface NSBundle (WeChatTweak)
|
||||
|
||||
+ (instancetype)tweakBundle;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// NSBundle+WeChatTweak.m
|
||||
// WeChatTweak
|
||||
//
|
||||
// Created by Sunnyyoung on 2017/8/12.
|
||||
// Copyright © 2017年 Sunnyyoung. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSBundle+WeChatTweak.h"
|
||||
|
||||
@implementation NSBundle (WeChatTweak)
|
||||
|
||||
+ (instancetype)tweakBundle {
|
||||
return [NSBundle bundleWithIdentifier:@"net.sunnyyoung.WeChatTweak"];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// NSString+WeChatTweak.h
|
||||
// WeChatTweak
|
||||
//
|
||||
// Created by Sunnyyoung on 2017/8/12.
|
||||
// Copyright © 2017年 Sunnyyoung. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface NSString (WeChatTweak)
|
||||
|
||||
- (NSString *)tweak_subStringFrom:(NSString *)beginString to:(NSString *)endString;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// NSString+WeChatTweak.m
|
||||
// WeChatTweak
|
||||
//
|
||||
// Created by Sunnyyoung on 2017/8/12.
|
||||
// Copyright © 2017年 Sunnyyoung. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSString+WeChatTweak.h"
|
||||
|
||||
@implementation NSString (WeChatTweak)
|
||||
|
||||
- (NSString *)tweak_subStringFrom:(NSString *)beginString to:(NSString *)endString {
|
||||
NSRange begin = [self rangeOfString:beginString];
|
||||
NSRange end = [self rangeOfString:endString];
|
||||
NSRange range = NSMakeRange(begin.location + begin.length, end.location - begin.location - begin.length);
|
||||
return [self substringWithRange:range];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user