...
- Document$ is a string expression containing a source document
- Search$ is a string expression containing a search string which is to be replaced or marks a spot in Document$. Can be "NullString" to insert sentences (see remarks and examples).
- InsRepDoc$ is a string expression containing either a string or a document, replacing Search$ (Pos% = 0)or to be inserted on a specific location indicated by Pos% and marked bySearch$
- Pos% is the position in Document$:
...
- REPLINS$ returns a document on which Remove and Insert operations are performed.
- When Search$ = "NullString", sentences will be inserted based on the position defined by Pos% (see examples)
- Please look at the MARK$() function to replace parameters in a data set.
- The use of REPLINS$() in combination with other string/text manipulation functions will provide flexible means to process text data.
...
Add Mere anarchy is loosed upon the world after the first sentence:
Pos% = 1
Search$ = "NullString"
InsRepDoc$ = "Mere anarchy is loosed upon the world"
...
Document4$ = REPLINS$(Document3$, "NullString", "Mere anarchy is loosed upon the world", 1)
...
Add Turning and turning in the widening gyre two lines before the first sentence:
Pos% = -2
Search$ = "NullString"
InsRepDoc$ = "Turning and turning in the widening gyre"
...
Document5$ = REPLINS$(Document4$, "NullString", "Turning and turning in the widening gyre", -2)
...