Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, March 28, 2024

File: [Platon] / libplaton / platon / str / strconv.c (download)

Revision 1.8, Wed Oct 2 20:13:59 2002 UTC (21 years, 6 months ago) by nepto


Changes since 1.7: +1 -1 lines

Fixed #include directives according to created #include policy.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <platon/str/strconv.h>

    char *
PLATON_FUNC(strconv)(str, charset_from, charset_to)
    char *str;
    char *charset_from;
    char *charset_to;
{
    register int i;
    register char *c;

    if (str == NULL || charset_from == NULL || charset_to == NULL)
        return NULL;

    for (i = 0; str[i] != '\0'; i++)
        if ((c = strchr(charset_from, str[i])) != NULL)
            str[i] = charset_to[(int) (c - charset_from)];

    return str;
}


Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top