#include <lcstring.h> char *strxlt(char *str, const char *table);
strxlt
translates a null-terminated string from one character set
to another. The first argument is the address of the string (str
)
to be translated. table
is a pointer to a 256-byte translation
table, which should be defined so that table[c]
for any character c
is the value to which c
should be translated. (The function xltable
can frequently be used to build such a table.)
The argument string is translated in place; that is, each character in the string is replaced by a translated character. The null character that terminates the string is never translated.
strxlt
is not defined.
strxlt
is implemented by inline code unless the function is
undefined (by an #undef
statement) to prevent this.
#include <lcstring.h> char punctab[256] ; char *number, *where; /* Build a table to interchange comma and period. */ xltable(punctab, ",.", ".,"); . . . /* Interchange comma and period for European */ /* conventions. */ if (strcmp(where, "Europe") == 0) strxlt(number, punctab);
memxlt
, strlwr
, strupr
, xltable
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.