Skip to content

For padding on the left for aligining to the right, if you ever need it...

License

Notifications You must be signed in to change notification settings

danielrayali/leftpad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leftpad

Just a simple program that will pad text on the left to align it on the right. That's it. Just in case anyone needs it for anything...

Dependencies

  • g++ with C++11 support
  • Make

Building

$ make

Running

$ ./leftpad 
Usage: ./leftpad <margin> [input_file]
<margin> is required. [input_file] is optional. If [input_file] unspecfied, default is standard input.
$ cat input.txt 
But I must explain to you how all 
        this mistaken idea of denouncing of a 
  pleasure and praising pain
$ ./leftpad 50 < input.txt 
                 But I must explain to you how all
             this mistaken idea of denouncing of a
                        pleasure and praising pain

License

See LICENSE file.

About

For padding on the left for aligining to the right, if you ever need it...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published