ezeio2:scriptref:valstr

Convert an integer to a string

Description

valstr( dest[], value, bool:pack=true )

Parameter dest should be of sufficient size to hold the converted number. The function does not check this.

Parameters

dest The buffer that will hold the string
value integer value to be converted
pack (optional) Controls if the resulting string is packed or not. Default is true (packed).

Return value

Number of characters writted to dest, excluding the terminating null character.

Example usage

   new x = 1234;
   new s{20};
 
   valstr(s, x);  // returns 4
 
   // s now contains "1234"
  • ezeio2/scriptref/valstr.txt
  • Last modified: 2019-09-02 21:45
  • by andreh