Determine if a string is squeezable: Difference between revisions

m
→‎{{header|REXX}}: corrected an input data field in the REXX program and it's corresponding output.
(→‎{{header|REXX}}: removed bogus flagging as all five strings were indeed used, with eight results as per the task's requirements.)
m (→‎{{header|REXX}}: corrected an input data field in the REXX program and it's corresponding output.)
Line 423:
#.1= ' '; @.1=
#.2= '-'; @.2= '"If I were two-faced, would I be wearing this one?" --- Abraham Lincoln '
#.3= '7'; @.3= ..11111111111111111111111111111111111111111111111111111111111111111777881111111111111111111111111111111111111111111111111111111111111117777888
#.4= . ; @.4= "I never give 'em hell, I just tell the truth, and they think it's hell. "
#.5= ' '; @.5= ' --- Harry S Truman '
Line 432:
say copies('═', 105) /*show a separator line between outputs*/
if j>1 & L==0 then leave /*if arg is null and J>1, then leave. */
say ' specified immediate repeatable chararactercharacter=' #.j " ('"c2x(#.j)"'x)"
say ' length='right(L, 3) " input=«««" || @.j || '»»»'
new= squeeze(@.j, #.j)
Line 452:
<pre>
═════════════════════════════════════════════════════════════════════════════════════════════════════════
specified immediate repeatable chararactercharacter= ('20'x)
length= 0 input=«««»»»
length= 0 output=«««»»»
═════════════════════════════════════════════════════════════════════════════════════════════════════════
specified immediate repeatable chararactercharacter= - ('2D'x)
length= 72 input=«««"If I were two-faced, would I be wearing this one?" --- Abraham Lincoln »»»
length= 70 output=«««"If I were two-faced, would I be wearing this one?" - Abraham Lincoln »»»
═════════════════════════════════════════════════════════════════════════════════════════════════════════
specified immediate repeatable chararactercharacter= 7 ('37'x)
length= 72 input=«««..11111111111111111111111111111111111111111111111111111111111111111777881111111111111111111111111111111111111111111111111111111111111117777888»»»
length= 7069 output=«««..111111111111111111111111111111111111111111111111111111111111111117881111111111111111111111111111111111111111111111111111111111111117888»»»
═════════════════════════════════════════════════════════════════════════════════════════════════════════
specified immediate repeatable chararactercharacter= . ('2E'x)
length= 72 input=«««I never give 'em hell, I just tell the truth, and they think it's hell. »»»
length= 72 output=«««I never give 'em hell, I just tell the truth, and they think it's hell. »»»
═════════════════════════════════════════════════════════════════════════════════════════════════════════
specified immediate repeatable chararactercharacter= ('20'x)
length= 72 input=««« --- Harry S Truman »»»
length= 20 output=««« --- Harry S Truman »»»
═════════════════════════════════════════════════════════════════════════════════════════════════════════
specified immediate repeatable chararactercharacter= - ('2D'x)
length= 72 input=««« --- Harry S Truman »»»
length= 70 output=««« - Harry S Truman »»»
═════════════════════════════════════════════════════════════════════════════════════════════════════════
specified immediate repeatable chararactercharacter= r ('72'x)
length= 72 input=««« --- Harry S Truman »»»
length= 71 output=««« --- Hary S Truman »»»