« first day (1928 days earlier)      last day (732 days later) » 

1:46 AM
In Dyalog 18 I’d probably do ⊢⊢⍤/⍨(~¯1↓∧\∨⊢∧1⌽⊢)⍥(1,⍨' '=⊢).
Without appending the 1 it fails for 'happy '. I.e. a single trailing space.
 
 
5 hours later…
7:03 AM
I think this achieves something similar to B><\B in the algorithm ovs posted.
 
 
15 hours later…
9:59 PM
Why is '2⊥⍣¯1⊢0' returning ⍬ and not 0?
 
10:47 PM
I'm not sure, but if you want 0 you can do 2⊤0
 
 
1 hour later…
11:55 PM
@Richard because 2⊥⍬ is 0
 

« first day (1928 days earlier)      last day (732 days later) »