2021-04-07 16:20:41 +08:00
|
|
|
//
|
|
|
|
// NSString+Tools.h
|
|
|
|
// TDS
|
|
|
|
//
|
|
|
|
// Created by JiangJiahao on 2018/4/24.
|
|
|
|
// Copyright © 2018年 dyy. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
@interface NSString (Tools)
|
|
|
|
- (NSString *)tds_URLEncodedString;
|
|
|
|
- (NSString *)tds_URLDecodedString;
|
|
|
|
///反转字符串
|
|
|
|
- (NSString *)tds_reverse;
|
|
|
|
|
|
|
|
// MD5 hash of the file on the filesystem specified by path
|
2021-05-14 19:40:33 +08:00
|
|
|
+ (NSString *)tds_stringWithMD5OfFile:(NSString *)path;
|
2021-04-07 16:20:41 +08:00
|
|
|
// The string's MD5 hash
|
|
|
|
- (NSString *)tds_MD5Hash;
|
|
|
|
|
|
|
|
// base64
|
|
|
|
- (NSString *)tds_base64Encode;
|
2021-05-14 19:40:33 +08:00
|
|
|
- (NSString *)tds_base64Decode;
|
|
|
|
|
|
|
|
// aes256
|
|
|
|
- (NSString *)tds_aes256Encrypt:(NSString *)key;
|
|
|
|
- (NSString *)tds_aes256Decrypt:(NSString *)key;
|
2021-04-07 16:20:41 +08:00
|
|
|
|
|
|
|
/// 是否是空字符串
|
|
|
|
+ (BOOL)tds_isEmpty:(NSString *)string;
|
2021-05-08 11:59:04 +08:00
|
|
|
|
|
|
|
- (NSDictionary *)tds_toDictionary;
|
2021-04-07 16:20:41 +08:00
|
|
|
@end
|