Substring/Top and tail: Difference between revisions

Content added Content deleted
(→‎{{header|REXX}}: added two REXX versions.)
m (→‎{{header|REXX}}: re-did the comments for the OUTPUT section comments.)
Line 1,026: Line 1,026:
say 'string first & last character removed =' substr(z,2,max(0,length(z)-2
say 'string first & last character removed =' substr(z,2,max(0,length(z)-2
/*stick a fork in it, we're done.*/</lang>
/*stick a fork in it, we're done.*/</lang>
'''output is the same as the 1<sup>st</sup> REXX version.
'''output''' is the same as the 1<sup>st</sup> REXX version.


===faster version===
===faster version===
Line 1,040: Line 1,040:
say 'string first & last character removed =' substr(z,2,max(0,length(z)-2
say 'string first & last character removed =' substr(z,2,max(0,length(z)-2
/*stick a fork in it, we're done.*/</lang>
/*stick a fork in it, we're done.*/</lang>
'''output is the same as the 1<sup>st</sup> REXX version. <br><br>
'''output''' is the same as the 1<sup>st</sup> REXX version. <br><br>


=={{header|Ruby}}==
=={{header|Ruby}}==