STRESS Name
STRESS Purpose
String edit by sub-string. Precede, Follow, Delete, Replace.
Category
Calling Sequence
new = stress(old,cmd,n,oldss,newss,ned)
Inputs
old = string to edit. in
cmd = edit command: in
'P' = precede.
'F' = follow.
'D' = delete.
'R' = replace.
n = occurrence number to process (0 = all). in
oldss = reference substring. in
oldss may have any of the following forms:
1. s a single substring.
2. s... start at substring s, end at end of string.
3. ...e from start of string to substring e.
4. s...e from subs s to subs e.
5. ... entire string.
newss = substring to add. Not needed for 'D' in
Keyword Parameters
Outputs
ned = number of occurrences actually changed. out
new = resulting string after editing. out
Common Blocks
Notes
Notes: oldss and newss may be arrays.
Modification History
Written by R. Sterner, 6 Jan, 1985.
Johns Hopkins University Applied Physics Laboratory.
RES --- 23 May, 1988 fixed a bug in SSTYP = 2.
Converted to SUN 13 Aug, 1989 --- R. Sterner. (FOR loop change).
--- 8 Dec, 1992 added recursion so that OLDSS and NEWSS may be arrays
T.J.Harris, University of Adelaide.
R. Sterner, 2010 Apr 29 --- Converted arrays from () to [].
R. Sterner, 2010 Dec 20 --- Added some comments.
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.