[Main]
Name=CB_replaceTEXT
Type=Function
Subtype=ROM Call
Header Files=system.h
Definition=short CB_replaceTEXT (char *text, unsigned long len, short strip_CR);
See Also=system.h/CB_fetchTEXT

[ROM Call]
Index=$C1

[Description]
Puts a text into the clipboard.

[Explanation]
CB_replaceTEXT puts <I>len</I> bytes starting from the address <I>text</I> to the
clipboard. TIOS only uses clipboard for storing text, but it is capable to store other types
too. <I>strip_CR</I> is Boolean parameter: if it is <A HREF="$$LINK(alloc.h/Bool)">TRUE</A>, each byte
which follows immidiately after '\r' character (0xD) will not be stored in the clipboard
(this in fact stripes out command characters in text editor: see <A HREF="$$LINK(textedit.h/)">textedit.h</A>
header file). CB_replaceTEXT returns <A HREF="$$LINK(alloc.h/Bool)">TRUE</A> if the operation was successful,
else returns <A HREF="$$LINK(alloc.h/Bool)">FALSE</A> (e.g. no enough memory). This routine may cause heap
compression.

[References]
Out=alloc.h/HeapRealloc, mem.h/memcpy
In=textedit.h/TE_handleEvent
