function f(c,s,t)
p=find(s==c)-find(t==c);disp([repmat(32,1,max(-p,0)) s]),disp([repmat(32,1,max(p,0)) t])

end % line needed in online interpreter only

f(',', 'Programming, Puzzles', 'And, Code golf')