| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

strclose

#include "sflstr.h"
char *
strclose (
    char *string,
    Bool align)

Synopsis

Removes the character at string, and shifts the remainder down by one. If align is TRUE, only shifts up to the next gap of 2 or more spaces. Returns string.

Source Code - (sflstr.c)

{
    char *gap;
    int  length;

    ASSERT (string);
    length = strlen (string);           /*  By default, move string + NULL   */
    if (align) {                        /*  If align is TRUE, find gap       */
        gap = strstr (string, "  ");
        if (gap && gap != string)
            length = (int) (gap - string);
    }
    memmove (string, string + 1, length);
    return (string);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation