ASCIIZToLenStr

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

Library:LibC
Service:Characters and Strings

Syntax

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

Parameters

destStr

(OUT) Points to the destination string.

srcStr

(IN) Points to the source string in ASCIIZ format.

Return Values

If successful, returns 0; otherwise, returns -1.

Remarks

The ASCIIZToLenStr function 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.