NSString+ex.h 649 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**可用于字符串加密。
  2. xml解析。
  3. */
  4. #import <Foundation/Foundation.h>
  5. #import <CommonCrypto/CommonDigest.h>
  6. @interface NSString (ex)
  7. /**@"<ns:return>" @"</ns:return>"之间的结果
  8. */
  9. -(NSString* )getXlmRet;
  10. -(NSString*)getCode;
  11. /**返回一个json字典或数组
  12. */
  13. -(id)jsonObject;
  14. - (NSString *)md5Encrypt;
  15. /**把一个数字的字符串,变成小时分钟。
  16. 最少0分钟
  17. */
  18. -(NSString*)hourAndmm;
  19. /**固定宽度,和字体大小。返回label高度
  20. */
  21. -(CGFloat)heightForWid:(CGFloat)wid Font:(CGFloat)fontSize;
  22. -(CGSize)sizeForFont:(CGFloat)fontSize;
  23. -(NSString*)base64;
  24. @end