| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflstr.h" char * stropen ( char *string, Bool align)
Inserts a character at string, and places a blank in the gap. If align is TRUE, makes room by reducing the size of the next gap of 2 or more spaces. If align is FALSE, extends the size of the string. Returns string.
{ char *gap; int length; ASSERT (string); length = strlen (string) + 1; /* By default, move string + NULL */ if (align) /* If align is TRUE, find gap */ { gap = strstr (string, " "); if (gap) length = (int) (gap - string); } memmove (string + 1, string, length); string [0] = ' '; /* Stick a space into string */ return (string); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |