ASCIIZToLenStr

Converts an ASCIIZ (NULL-terminated) string to a length-preceded string

Local Servers:nonblocking
Remote Servers:N/A
Classification:3.x, 4.x, 5.x, 6.x
Service:String Conversion

Syntax

  #include <nwstring.h>  
   
  int ASCIIZToLenStr  (  
     char   *destStr,   
     char   *srcStr);
  

Parameters

destStr
(OUT) Points to the destination string.
srcStr
(IN) Points to the source string in ASCIIZ format.

Return Values

The following table lists return values and descriptions.

Value

Hex

Name

Description

0

(0x00)

ESUCCESS

 

1

(0x01)

ERR_STRING_EXCEEDS_LENGTH

Longer than 255 characters.

Remarks

ASCIIZToLenStr converts an ASCIIZ (NULL-terminated) string to a length-preceded string. A length-preceded string has the length of the string in the first byte, followed by the characters of the string.

The destStr and srcStr parameters might not point at the same string.