string padding and replacement functions
I want to steal some Linux string manipulation functions (replacement and padding) in my C/C++ program to process a couple of large files to save my time. :-)
I want to use,
1. String padding, for example, padding a sign ':' to each end of line;
2. String replacement, for example, replace "enter" with "exit";
All the files I am working on are text files (ASCII). I am wondering what Linux command(s) should I use? Could anyone show me an example please?
thanks in advance,