[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function            strpadleft - pad the left of a string

  Syntax              char *strpadleft(char *str, char c, int len);

  Prototype in        stringhk.h

  Remarks             str will be padded on the left with len characters
                      of c. Make sure space allocated for str is big
                      enough to hold the new padded string.

  Return value        returns a pointer to the storage location
                      containing the newly padded string.

  See also            strpadright()

  Example             #include <stringhk.h>

                      main()
                      {
                           char temp[30];

                           strcpy(temp,"This is a sample.");
                           printf("Before: %s\n",temp);
                           printf(" After: %s\n",strpadleft(temp,'.',3));
                      }

  Program output      Before: This is a sample.
                       After: ...This is a sample.


See Also: strpadright()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson