xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HB_UUEncode()

UUEncodes a character string.

Syntax

HB_UUEncode( <cString>, <nBytes> ) --> cUUEncoded

Arguments

<cString>
This is a character string to UUEncode.
<nBytes>
The number of bytes to encode from <cString> must be passed as second parameter. Use the expression Len(<cString>) to encode the entire string.

Return

The function returns a UUEncoded character string.

Description

HB_UUEncode() uses the UUEncode algorithm for encoding a character string.

Pass the resulting string to function HB_UUDecode() to obtain the original data.

Info

See also:HB_UUDecode(), HB_UUDecodeFile(), HB_UUEncodeFile()
Category: Encoding/Decoding , xHarbour extensions
Source:tip\encoding\UUEncode.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example outlines UUEncoding and decoding.

   PROCEDURE Main
      LOCAL cString   := "xHarbour"
      LOCAL cUUEncode := HB_UUEncode( cString, Len(cString ) )

      ? cUUEncode                 // result: (>$AA<F)O=7(`rg

      ? HB_UUDecode( cUUEncode )  // result: xHarbour
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe