home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / NSScanner.h < prev    next >
Text File  |  1996-09-11  |  1KB  |  46 lines

  1. /*    NSScanner.h
  2.     Simple scanning on strings
  3.     Copyright 1994-1996, NeXT Software, Inc.  All rights reserved.
  4. */
  5.  
  6. #import <Foundation/NSObject.h>
  7.  
  8. @class NSString, NSCharacterSet, NSDictionary;
  9.  
  10. @interface NSScanner : NSObject <NSCopying>
  11.  
  12. - (NSString *)string;
  13. - (unsigned)scanLocation;
  14. - (void)setScanLocation:(unsigned)pos;
  15. - (void)setCharactersToBeSkipped:(NSCharacterSet *)set;
  16. - (void)setCaseSensitive:(BOOL)flag;
  17. - (void)setLocale:(NSDictionary *)dict;
  18.  
  19. @end
  20.  
  21. @interface NSScanner (NSExtendedScanner)
  22.  
  23. - (NSCharacterSet *)charactersToBeSkipped;
  24. - (BOOL)caseSensitive;
  25. - (NSDictionary *)locale;
  26.  
  27. - (BOOL)scanInt:(int *)value;
  28. - (BOOL)scanHexInt:(unsigned *)value;        /* Optionally prefixed with "0x" or "0X" */
  29. - (BOOL)scanLongLong:(long long *)value;
  30. - (BOOL)scanFloat:(float *)value;
  31. - (BOOL)scanDouble:(double *)value;
  32. - (BOOL)scanString:(NSString *)string intoString:(NSString **)value;
  33. - (BOOL)scanCharactersFromSet:(NSCharacterSet *)set intoString:(NSString **)value;
  34.  
  35. - (BOOL)scanUpToString:(NSString *)string intoString:(NSString **)value;
  36. - (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)set intoString:(NSString **)value;
  37.  
  38. - (BOOL)isAtEnd;
  39.  
  40. - (id)initWithString:(NSString *)string;
  41. + (id)scannerWithString:(NSString *)string;
  42. + (id)localizedScannerWithString:(NSString *)string;
  43.  
  44. @end
  45.  
  46.