r/dailyprogrammer • u/rya11111 3 1 • Feb 24 '12
[2/24/2012] Challenge #15 [easy]
Write a program to left or right justify a text file
10
Upvotes
r/dailyprogrammer • u/rya11111 3 1 • Feb 24 '12
Write a program to left or right justify a text file
5
u/luxgladius 0 0 Feb 24 '12 edited Feb 24 '12
Left justify seems pretty darn easy.
Perl
Right justify isn't too much worse.
Perl
2
u/lukz 2 0 Feb 24 '12
Common Lisp
left justify - just trimming
right justify for 80 columns
2
u/eruonna Feb 24 '12
Haskell, right justify to length of longest line:
1
u/PrivatePilot Feb 24 '12
ruby
1
u/robin-gvx 0 2 Feb 25 '12
Very simplistic solution in Déjà Vu: http://hastebin.com/raw/risifejufi
1
u/cooper6581 Feb 26 '12
Python:
1
u/school_throwaway Feb 27 '12