Logo Search packages:      
Sourcecode: pulseaudio version File versions

char* pa_ascii_filter ( const char *  str  ) 

Filter all invalid ASCII characters from the specified string, returning a new fully ASCII valid string. Don't forget to free the returned string with pa_xfree().

Since:
0.9.15

Definition at line 278 of file utf8.c.

                                       {
    char *r, *s, *d;
    pa_assert(str);

    r = pa_xstrdup(str);

    for (s = r, d = r; *s; s++)
        if ((unsigned char) *s < 128)
            *(d++) = *s;

    *d = 0;

    return r;
}


Generated by  Doxygen 1.6.0   Back to index