home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / BuildingBlocks / StringInfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  1.0 KB  |  50 lines  |  [TEXT/R*ch]

  1. /*
  2.     File:        StringInfo.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __STRINGINFO__
  15. #define __STRINGINFO__ 1
  16.  
  17. #ifndef __OCE__
  18. #include <OCE.h>
  19. #endif
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24.  
  25. class TStringInfo
  26. {
  27. public:                                TStringInfo ( const RString& rStr );
  28.                                     TStringInfo ( const char* str );
  29.                                     TStringInfo ( const Str255 str );
  30.                                     TStringInfo ( const void* data, unsigned long length );
  31.                                     ~TStringInfo ();
  32.  
  33.     short                            Count ( char c ) const;
  34.     short                            First ( char c ) const;
  35.     short                            Last ( char c ) const;
  36.  
  37.     void                            SetString ( const RString& rStr );
  38.     void                            SetString ( const char* str );
  39.     void                            SetString ( const Str255 str );
  40.     void                            SetString ( const void * data, unsigned long length );
  41.  
  42. protected:
  43.  
  44.             short                    fFirst [ 256 ];
  45.             short                    fCount [ 256 ];
  46.             short                    fLast [ 256 ];
  47. };
  48.  
  49. #endif  //__STRINGINFO__
  50.