NSString+AvoidCrash.h 960 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // NSString+AvoidCrash.h
  3. // https://github.com/chenfanfang/AvoidCrash
  4. //
  5. // Created by mac on 16/10/5.
  6. // Copyright © 2016年 chenfanfang. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "AvoidCrashProtocol.h"
  10. @interface NSString (AvoidCrash)<AvoidCrashProtocol>
  11. @end
  12. /**
  13. * Can avoid crash method
  14. *
  15. * 1. - (unichar)characterAtIndex:(NSUInteger)index
  16. * 2. - (NSString *)substringFromIndex:(NSUInteger)from
  17. * 3. - (NSString *)substringToIndex:(NSUInteger)to {
  18. * 4. - (NSString *)substringWithRange:(NSRange)range {
  19. * 5. - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement
  20. * 6. - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange
  21. * 7. - (NSString *)stringByReplacingCharactersInRange:(NSRange)range withString:(NSString *)replacement
  22. *
  23. */