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

 

strconvch

#include "sflstr.h"
char *
strconvch (
    char *string,
    char from,
    char to)

Synopsis

Converts all instances of one character in a string to some other character. Returns string. Does nothing if the string is NULL.

Source Code - (sflstr.c)

{
    char *scan;

    if (string)
      {
        scan = string;
        while (*scan)
          {
            if (*scan == from)
               *scan = to;
            scan++;
          }
      }
    return (string);
}

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