Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -13,29 +13,29 @@ new4=stripCom3(old2) ; say '4th version new ───►'new4"◄
|
|||
exit /*stick a fork in it, we're done.*/
|
||||
/*──────────────────────────────────STRIPCOM1 subroutine────────────────*/
|
||||
stripCom1: procedure; parse arg x /*get the argument (string). */
|
||||
x=translate(x,'#',";") /*translate semicolons to hash. */
|
||||
parse var x x '#' /*parse string, ending in hash. */
|
||||
x=translate(x, '#', ";") /*translate semicolons to hash. */
|
||||
parse var x x '#' /*parse string, ending in hash. */
|
||||
return strip(x) /*return striped shortened string*/
|
||||
/*──────────────────────────────────STRIPCOM2 subroutine────────────────*/
|
||||
stripCom2: procedure; parse arg x /*get the argument (string). */
|
||||
d='#;' /*delimiter list to be used. */
|
||||
d = ';#' /*the delimiter list to be used. */
|
||||
d1=left(d,1) /*get the 1st character in delim.*/
|
||||
x=translate(x,copies(d1,length(d)),d) /*trans all delims ──► 1st delim.*/
|
||||
parse var x x (d1) /*parse string, ending in hash. */
|
||||
parse var x x (d1) /*parse string, ending in hash. */
|
||||
return strip(x) /*return striped shortened string*/
|
||||
/*──────────────────────────────────STRIPCOM3 subroutine────────────────*/
|
||||
stripCom3: procedure; parse arg x /*get the argument (string). */
|
||||
d=';#' /*delimiter list to be used. */
|
||||
do j=1 for length(d) /*process each delimiter singly. */
|
||||
d = ';#' /*the delimiter list to be used. */
|
||||
do j=1 for length(d) /*process each delimiter singly. */
|
||||
_=substr(d,j,1) /*use one delimiter at a time. */
|
||||
parse var x x (_) /*parse X string for each delim. */
|
||||
parse var x x (_) /*parse X string for each delim. */
|
||||
end /*j*/
|
||||
return strip(x) /*return striped shortened string*/
|
||||
/*──────────────────────────────────STRIPCOM4 subroutine────────────────*/
|
||||
stripCom4: procedure; parse arg x /*get the argument (string). */
|
||||
d=';#' /*delimiter list to be used. */
|
||||
do k=1 for length(d) /*process each delimiter singly. */
|
||||
d = ';#' /*the delimiter list to be used. */
|
||||
do k=1 for length(d) /*process each delimiter singly. */
|
||||
p=pos(substr(d,k,1),x) /*see if a delimiter is in X. */
|
||||
if p\==0 then x=left(x,p-1) /*shorten the X string.*/
|
||||
if p\==0 then x=left(x,p-1) /*shorten the X string.*/
|
||||
end /*k*/
|
||||
return strip(x) /*return striped shortened string*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue