NIMSpellingCenter.h 784 B

1234567891011121314151617181920212223242526
  1. //
  2. // NTESSpellingCenter.h
  3. // NIM
  4. // 用于拼音全称和简称生成查询读取的类
  5. // Created by amao on 13-1-21.
  6. // Copyright (c) 2013年 Netease. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface NIMSpellingUnit : NSObject<NSCoding>
  10. @property (nonatomic,strong) NSString *fullSpelling;
  11. @property (nonatomic,strong) NSString *shortSpelling;
  12. @end
  13. @interface NIMSpellingCenter : NSObject
  14. {
  15. NSMutableDictionary *_spellingCache; //全拼,简称cache
  16. NSString *_filepath;
  17. }
  18. + (NIMSpellingCenter *)sharedCenter;
  19. - (void)saveSpellingCache; //写入缓存
  20. - (NIMSpellingUnit *)spellingForString: (NSString *)source; //全拼,简拼 (全是小写)
  21. - (NSString *)firstLetter: (NSString *)input; //首字母
  22. @end