fork download
  1. function f(c,s,t)
  2. p=find(s==c)-find(t==c);disp([repmat(32,1,max(-p,0)) s]),disp([repmat(32,1,max(p,0)) t])
  3.  
  4. end % line needed in online interpreter only
  5.  
  6. f(',', 'Programming, Puzzles', 'And, Code golf')
Success #stdin #stdout 0.17s 65056KB
stdin
Standard input is empty
stdout
Programming, Puzzles
        And, Code golf