home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Games / Game Sample Code / SpriteWorld 1.0b3 / Examples / Utils / StringUtils.c < prev    next >
Encoding:
Text File  |  1993-06-12  |  1.0 KB  |  45 lines  |  [TEXT/KAHL]

  1. ///--------------------------------------------------------------------------------------
  2. //    StringUtils.c
  3. //
  4. //    Created:    12/17/91 at 12:35:35 AM
  5. //    By:        Tony Myles
  6. //
  7. //    Copyright: © 1991-93 Tony Myles, All rights reserved worldwide.
  8. ///--------------------------------------------------------------------------------------
  9.  
  10.  
  11. #ifndef __MEMORY__
  12. #include <Memory.h>
  13. #endif
  14.  
  15. #ifndef __STRINGUTILS__
  16. #include "StringUtils.h"
  17. #endif
  18.  
  19.  
  20. ///--------------------------------------------------------------------------------------
  21. // PStrCpy
  22. ///--------------------------------------------------------------------------------------
  23.  
  24. void PStrCpy(
  25.     Str255 srcStr,
  26.     Str255 dstStr)
  27. {
  28.     BlockMove(srcStr, dstStr, 1 + srcStr[0]);
  29. }
  30.  
  31.  
  32. ///--------------------------------------------------------------------------------------
  33. // PStrCat
  34. ///--------------------------------------------------------------------------------------
  35.  
  36. void PStrCat(
  37.     Str255 srcStr,
  38.     Str255 dstStr)
  39. {
  40.     BlockMove(srcStr + 1, dstStr + dstStr[0] + 1, srcStr[0]);
  41.  
  42.     dstStr[0] += srcStr[0];
  43. }
  44.  
  45.