all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,20 @@
/*REXX program to show removal of 1st/last/1st&last chars from a string.*/
z = 'abcdefghijk'
say ' the original string =' z
say 'string first character removed =' substr(z,2)
say 'string last character removed =' left(z,length(z)-1)
say 'string first & last character removed =' substr(z,2,length(z)-2)
exit
/* ┌───────────────────────────────────────────────┐
however, the original string may be null,
or of insufficient length which may cause the
BIFs to fail (because of negative length).
*/
say ' the original string =' z
say 'string first character removed =' substr(z,2)
say 'string last character removed =' left(z,max(0,length(z)-1))
say 'string first & last character removed =' substr(z,2,max(0,length(z)-2))
/*stick a fork in it,we're done.*/