fork download
  1. USING: splitting sequences kernel math io prettyprint ;
  2. IN: work
  3.  
  4. : star-struck ( str -- n ) [ CHAR: * = not ]
  5. split-when [ length 1 > ] filter concat length ;
  6.  
  7. : out ( str -- ) dup star-struck [ write ] dip bl . ;
  8.  
  9. "*xy***" out
  10. "a*bc**def****g" out
  11. "*a*b*c*d***e*f****" out
Success #stdin #stdout 0.16s 158016KB
stdin
Standard input is empty
stdout
*xy*** 3
a*bc**def****g 6
*a*b*c*d***e*f**** 7