CopyMemoryString()

Syntax

Result = CopyMemoryString(*String [, @*DestinationMemoryID])
Description
For advanced user only. Copy the String at the specified address to the destination memory address if specified, or at the end of the current buffer if omitted. If *DestinationMemoryID is specified, the internal buffer pointer is resetted the new value. The internal pointer is automatically updated after a copy, so it's very handy to do a stream copy of strings, while keeping the pointer control. This is command is especially optimized to manipulated memory text buffer extremely quickly.

Example:
  *Buffer = AllocateMemory(1000)
  *Pointer = *Buffer
  CopyMemoryString("Hello", @*Pointer)
  CopyMemoryString(" World")  ; This one will be put just after "Hello"
  *Pointer-2                  ; Come back from 2 characters (on the 'l' of 'World')
  CopyMemoryString("LD")      ; Finally the last letter will be uppercase
  Debug PeekS(*Buffer)

Supported OS

All

<- CopyMemory() - Memory Index - FreeMemory() ->