NSString+Category.h 708 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
//
//  NSString+Category.h
//  Lighting
//
//  Created by 曹云霄 on 2016/12/23.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Category)

/**
 *  计算文字高度
 *
 *  @param fontSize 字体大小
 *  @param width    宽度
 *
 *  @return 高度
 */
- (CGFloat)heightWithFontSize:(CGFloat)fontSize width:(CGFloat)width;

/**
 *  计算文字宽度度
 *
 *  @param fontSize 字体大小
 *  @param height   高度
 *
 *  @return 宽度
 */
- (CGFloat)widthWithFontSize:(CGFloat)fontSize height:(CGFloat)height;


34 35 36 37 38 39
/**
 格式化字符串
 
 @param string 去掉前后空格
 */
- (NSString *)formatString;
40
@end