home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWCommon / SLPriStr.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.1 KB  |  79 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLPriStr.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef SLPRISTR_H
  11. #define SLPRISTR_H
  12.  
  13. #ifndef FWSTDDEF_H
  14. #include "FWStdDef.h"
  15. #endif
  16.  
  17. #include <stddef.h>
  18.  
  19. #ifdef FW_BUILD_WIN
  20. #include <ctype.h>
  21.     // Include for toupper, tolower, isspace
  22. #endif
  23.  
  24. // Export or Import functions for CFM-68K [sfu]
  25.  
  26. FW_EXTERN_C_BEGIN
  27.  
  28. #if defined(FW_ODFLIB_IMPORT)
  29. #pragma import on
  30. #elif defined(FW_ODFLIB)
  31. #pragma export on
  32. #endif
  33.  
  34. size_t FW_PrimitiveStringLength(const char * p);
  35.     // Returns the length of string p.
  36.     
  37. FW_Boolean FW_PrimitiveStringEqual(const char *p1, const char *p2);
  38.     // Compares string p1 to p2. Returns 1 if equal and 0 if false.
  39.     // Compares bytes, not characters!
  40.     
  41. int FW_PrimitiveStringCompare(const char *p1, const char *p2);
  42.     // Compares -1 if p1<p2, 0 if p1==p2, 1 if p1>p2.
  43.     // Compares bytes, not characters!
  44.     
  45. void FW_PrimitiveStringCopy(const char *source, char *destination);
  46.     // Copies string source to string destination.
  47.     // Assumes that destination is large enough!
  48.  
  49. char* FW_PrimitiveStringDuplicate(const char *source);
  50.     // Duplicate string source.
  51.         
  52. void FW_PrimitiveStringCatenate(const char *source, char *destination);
  53.     // Appends string source onto string destination.
  54.     // Assumes that destination is large enough!
  55.         
  56. char * FW_PrimitiveStringFindCharacter(const char *source, char c);
  57.     // Return pointer to first occurrence of c in source or NULL if not present.
  58.     
  59. char FW_PrimitiveCharacterToUpper(char c);
  60.     // Return character c converted to upper case.
  61.     
  62. char FW_PrimitiveCharacterToLower(char c);
  63.     // Return character c converted to lower case.
  64.  
  65. char FW_PrimitiveCharacterIsSpace(char c);
  66.     // Returns non-zero if character is space, tab, carriage return, or newline.
  67.  
  68. // For CFM-68K [sfu]
  69.  
  70. #if defined(FW_ODFLIB_IMPORT)
  71. #pragma import off
  72. #elif defined(FW_ODFLIB)
  73. #pragma export off
  74. #endif
  75.  
  76. FW_EXTERN_C_END
  77.  
  78. #endif
  79.