NSString(TuSDKTSStringExtend) Category Reference

Declared in TuSDKTSString+Extend.h

Overview

字符串帮助类

+ lsqLocalizedString:

获取本地化字符串

+ (NSString *)lsqLocalizedString:(NSString *)key

Parameters

key

键名

Return Value

本地化字符串

Declared In

TuSDKTSString+Extend.h

+ lsqBase64encode:

base64编码

+ (NSString *)lsqBase64encode:(NSString *)str

Parameters

str

输入字符串

Return Value

base64编码

Declared In

TuSDKTSString+Extend.h

– lsqBase64encode

base64编码

- (NSString *)lsqBase64encode

Return Value

base64编码

Declared In

TuSDKTSString+Extend.h

+ lsqIsEmptyOrNull:

判断字符串是否为空

+ (Boolean)lsqIsEmptyOrNull:(NSString *)str

Parameters

str

输入字符串

Return Value

判断字符串是否为空

Declared In

TuSDKTSString+Extend.h

+ lsqUUID

UUID

+ (NSString *)lsqUUID

Return Value

UUID

Declared In

TuSDKTSString+Extend.h

+ lsqStringForByte:

返回对应容量单位数

+ (NSString *)lsqStringForByte:(unsigned long long)byte

Parameters

byte

字节总数

Return Value

对应容量单位数

Declared In

TuSDKTSString+Extend.h

+ lsqStringFromOSType:

返回 OSType 对应的4位字符串

+ (NSString *)lsqStringFromOSType:(OSType)type

Parameters

type

OSType

Return Value

对应的字符串

Declared In

TuSDKTSString+Extend.h

– lsqEncodeAsURIComponent

编码URL

- (NSString *)lsqEncodeAsURIComponent

Return Value

编码URL

Declared In

TuSDKTSString+Extend.h

– lsqEscapeHTML

编码HTML

- (NSString *)lsqEscapeHTML

Return Value

编码HTML

Declared In

TuSDKTSString+Extend.h

– lsqUnescapeHTML

解码HTML

- (NSString *)lsqUnescapeHTML

Return Value

解码HTML

Declared In

TuSDKTSString+Extend.h

– lsqMd5

MD5编码

- (NSString *)lsqMd5

Return Value

MD5编码

Declared In

TuSDKTSString+Extend.h

– lsqSubstringLinefeed:

添加字符串省略号

- (NSString *)lsqSubstringLinefeed:(NSUInteger)length

Parameters

length

输出的字符串长度

Return Value

添加字符串省略号

Declared In

TuSDKTSString+Extend.h

– lsqTrim

删除字符串头尾空格

- (NSString *)lsqTrim

Return Value

删除字符串头尾空格

Declared In

TuSDKTSString+Extend.h

– lsqSubstringByRegular:

使用正则匹配子字符串

- (NSMutableArray *)lsqSubstringByRegular:(NSString *)regular

Parameters

regular

正则表达式

Return Value

子字符串集合

Declared In

TuSDKTSString+Extend.h

– lsqReverse

反转字符串

- (NSString *)lsqReverse

Return Value

反转字符串

Declared In

TuSDKTSString+Extend.h

– lsqHexString

获取字符串的hex

- (NSString *)lsqHexString

Return Value

字符串的hex

Declared In

TuSDKTSString+Extend.h

– lsqHexToDecimal

Hex转10进制数字

- (NSUInteger)lsqHexToDecimal

Return Value

10进制数字

Declared In

TuSDKTSString+Extend.h

– lsqToJson

转换为Json对象

- (id)lsqToJson

Return Value

Json对象

Declared In

TuSDKTSString+Extend.h

– lsqUnsignedLongLongValue

转换为 unsigned long long

- (unsigned long long)lsqUnsignedLongLongValue

Return Value

unsigned long long

Declared In

TuSDKTSString+Extend.h

– lsqUnsignedIntegerValue

转换为 NSUInteger

- (NSUInteger)lsqUnsignedIntegerValue

Return Value

NSUInteger

Declared In

TuSDKTSString+Extend.h

– lsqColculateTextSizeWithFont:maxWidth:maxHeihgt:

根据给定的限制内容,获得该字符串对应的最优Size

- (CGSize)lsqColculateTextSizeWithFont:(UIFont *)textFont maxWidth:(CGFloat)maxWidth maxHeihgt:(CGFloat)maxHeight

Return Value

CGSize

Declared In

TuSDKTSString+Extend.h

– lsqColculateTextSizeWithAttributs:maxWidth:maxHeihgt:

根据给定的限制内容,以及文本样式,获得该字符串对应的最优Size

- (CGSize)lsqColculateTextSizeWithAttributs:(NSDictionary *)Attribute maxWidth:(CGFloat)maxWidth maxHeihgt:(CGFloat)maxHeight

Return Value

CGSize

Declared In

TuSDKTSString+Extend.h