pjs.pointerString()



Get a string from a pointer to a null-terminated string or write a null-terminated string into a buffer using a pointer.

Parameters

  1. Field name - The name of a Profound.js pointer type field.

  2. Length (optional) - The length of data to get/set.

  3. String (optional) - A string to write into the field buffer pointed to by the given pointer field.

Return Value

The string pointed to by the given pointer field

Example

pjs.define("string", { type: 'char', length: 14}); pjs.define("p_string", { type: 'pointer' }); p_string = pjs.getBuffer(string); pjs.pointerString(p_string, 14, "Hello, world."); console.log(pjs.pointerString(p_string));

RPG Equivalent 

%STR()