Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>clear the high bit for every character in a string</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Clear the high bit for every character in a string
------------------------------------------------------------------------------

 Syntax

        GT_BitStrip(<cStr>) --> cOut

 Arguments:

      <cStr>  - The string to strip

 Returns:

      <cOut>  - The stripped string

 Description:

      Return the supplied string with all high bits turned off.
      Useful for clearing the high bits ready for transfer to a
      system that only understands true ASCII and not IBM's
      bastardized version.

      NOTE:
         invalid parameters will return ""

 Examples:


      local cStr := ""
      local i

      for i := asc("A") to asc("Z")
         cStr := cStr + chr(i + 128)
      next

      ? GT_BitStrip(cStr)         // prints ABCDEFGHIJKLMNOPQRSTUVWXYZ

 Source: BITSTRIP.C

 Author:  Andy M Leighton

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