Chapter Contents

Previous

Next
xltable

xltable



Build Character Translation Table

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLE
RELATED FUNCTIONS
SEE ALSO


SYNOPSIS

#include <lcstring.h>

char *xltable(char table[256], char *source, char *target);


DESCRIPTION

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.


RETURN VALUE

xltable returns the address of the table (the same value as that of the first argument).


EXAMPLE

See strxlt and memxlt for examples.


RELATED FUNCTIONS

memxlt , strxlt


SEE ALSO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.