[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function            strtabexpand - expand tabs to spaces

  Syntax              char *strtabexpand(char *source, char *dest,
                                         int tablen);

  Prototype in        stringhk.h

  Remarks             copies the string source to dest with all tabs
                      ('\t') replaced with tablen spaces.

                      The converted string will be returned in dest, so
                      you must make sure there is sufficient space
                      allocated.

  Return value        returns dest.

  See also            strspace2tab()

  Example             #include <stringhk.h>

                      main()
                      {
                           char spacestr[30];
                           char tabstr[30] = "Tabs\tare\tnice.";

                           printf("Converted string: %s\n",
                                  strtabexpand(tabstr,spacestr,4);
                      }

  Program output      Converted string: Tabs    are    nice.


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