#include <lcstring.h> char *xltable(char table[256], char *source, char *target);
xltable
builds a translation table that you can use later as an
argument to the memxlt
or strxlt
function.
The argument table
is a 256-character array, in which the
translation table is to be built. The second argument (source
) is
a string of characters that the table is to translate, and the third
argument (target
) is a string containing the characters to which
the source characters are to be translated, in the same order. The
source
and target
strings should contain the same number of
characters; if they do not, the extra characters of the longer string
are ignored.
You can also specify a table address of 0. In this case, xltable
builds the table in a static area and returns the address of this
area. This area may be overlaid by the next call to xltable
,
strscntb
, or memscntb
.
The table built by xltable
translates any character not present in
the source
string to itself, so these characters are not
changed when using the table.
xltable
returns the address of the table (the same value as that of
the first argument).
strxlt
and memxlt
for examples.
memxlt
, strxlt
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.