Overstrike

See Also: String Functions, Insert, Pos, Remove, Replace

Purpose

Overstrike returns a host string which has some or all of its characters replaced by a new string at a specified position in the host string.

Return Type

String

Syntax

(Overstrike( {new-string}, {host-string}, {position} ))

Where:

What It Does

Overstrike replaces the characters in {host-string} starting at {position} with the value of {new-string}.

Move "Fish not Chips" To sMenu

Showln (Overstrike("and", sMenu, 6))

In this example, the string "Fish and Chips" is shown.

The overstrike function resembles the mode of word processors known as overtype.

Notes

 

Show (Overstrike("123456789", "Begin hostString", -3))

The first four characters of 123456789 will be truncated, and the next five will overwrite the first five characters of "Begin hostString". This example would show "123456789tString".

 

Show (Overstrike("123456789", "automaton", 14))

This example would show "automaton ····123456789", where · represents a space.