pad a string with given charactor.
string str_pad_char( LPCSTR lpcstr, int nTotalLength, int nPaddingFormat, char chPading = ' ' )
a string padded from lpcstr with chPading.
EX1
void str_pad_char_ex1() { LPCSTR lpcstr = "Dollars"; int nTotalLength = 30; int nPaddingFormat = 0; char chPading = '$'; string strResult; strResult = str_pad_char(lpcstr, nTotalLength, nPaddingFormat, chPading); printf("%s\n",strResult); }
origin.h