Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - strunpack() unpack a string http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 strunpack()         Unpack a string
------------------------------------------------------------------------------
 Declaration
   string.hdr

 Syntax
   func char strunpack extern
   param const char cString

 Arguments
   cString is a packed string.

 Return
   The unpacked version of cString.

 Description
   The strunpack() function restores the original version of a string
   packed by the strpack() function.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_strunpack
   vardef
      char cString
      char cStringPacked
   enddef
   cString := "     Many......spaces     !"
   cStringPacked := strpack( cString )      // pack string
   ? len( cString ), cString                // original length is 27
   ? len( cStringPacked ), cStringPacked    // packed length is 20
   cString := strunpack( cStringPacked )    // unpack string
   ? len( cString ), cString                // restored length is 27
   endproc

   proc main
   Test_strunpack()
   endproc

See Also: strpack()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson