GET-STRING function

Returns the null-terminated character string at the specified memory location as a CHARACTER value (not including the null terminator) or the number of bytes specified starting from the specified memory location as a CHARACTER value.

Syntax

GET-STRING ( source , position [ , numbytes ] )
source
A function or variable that returns a RAW or MEMPTR value. If source is the Unknown value (?), GET-STRING returns the Unknown value (?).
position
An integer value greater than 0 that indicates the byte position where you want to find the information. If position is greater than the length of source, the AVM returns the Unknown value (?). If position is less than 1, the AVM generates a run-time error.
numbytes
An integer value greater than 0 that indicates how many bytes to convert into the CHARACTER value that is returned. If numbytes is not specified, or is -1, GET-STRING( ) returns all bytes until it encounters a NULL value.

Examples

For examples of how to use the GET-STRING function, see the GET-BYTE function reference entry.

Note

For more information on using the MEMPTR and RAW data types, see OpenEdge Development: Programming Interfaces.

See also

LENGTH function, PUT-STRING statement, RAW function, RAW statement, SET-SIZE statement