string_to_buffer

string_to_buffer — creates a buffer object from a string.

Syntax

string_to_buffer (string)

		

Arguments

string

The string to be converted to a buffer.

Returns

A buffer whose contents are those of the string.

Description

This function creates a buffer object from a string. The buffer and string are mapped to different memory areas, so that alterations to one do not affect the other.

Example

Gamma> a = "rhino";
"rhino"
Gamma> b = string_to_buffer(a);
#{rhino}
Gamma> a = "hippo";
"hippo"
Gamma> b;
#{rhino}
Gamma>  
		

See Also

buffer_to_string