Modula-2 ||
Compiler & Tools ||
Library ||
Search Engine
Ulm's Modula-2 Library:
StrSpec
NAME
StrSpec - special string operations
SYNOPSIS
PROCEDURE StrPartCpy(VAR target : ARRAY OF CHAR;
source : ARRAY OF CHAR;
position, number : CARDINAL);
PROCEDURE StrDel(VAR target : ARRAY OF CHAR;
position, number : CARDINAL);
PROCEDURE StrIns(VAR target : ARRAY OF CHAR;
insertion : ARRAY OF CHAR;
position : CARDINAL);
PROCEDURE StrPos(source,
search : ARRAY OF CHAR) : CARDINAL;
DESCRIPTION
IMPORTANT:
In the entire module the first character of a string is at
position
zero.
- StrPartCpy
- copies
number
characters starting at position
position
from
source
to
target. The copying is finished by reaching the end of either
source
or
target, or when
number
characters are copied.
The index of the first character in
target
is zero.
If the resulting string is too large for
target, trailing characters are cut off.
- StrDel
- deletes
number
characters starting at
position.
At the end of the string deletion stops.
- StrIns
- inserts
insertion
in
target
in front of
position.
If the resulting string is too large for
target, trailing characters are cut off.
- StrPos
- returns the starting position of the sub-string
search
within
source.
If
search
isn't in
source
the result is more than the greatest possible index for a character in
source.
SEE ALSO
Strings
AUTHOR
Gernot Skalla, Universität Osnabrück
Edited by: borchert, last change: 1997/02/25, revision: 1.2, converted to HTML: 1997/04/28
Modula-2 ||
Compiler & Tools ||
Library ||
Search Engine