xt_strtr(3)

NAME
xt_strtr() - Library function equivalent of tr(1)

LIBRARY
#include <xtend/string.h>
-lxtend

SYNOPSIS
void    xt_strtr(char *string, const char *from, const char *to, int flags)

ARGUMENTS
string  The string to be transformed
from    Characters to be replaced with those in to
to      Characters to replace those in from
flags   Bit mask to enable optional features simlar to tr(1)

DESCRIPTION
Translate characters in a string similar to tr(1), where each occurrence of from[i] is replaced with to[i] in string. Currently only replacement is supported and flags is ignored. In the future, additional features such as deletion and compaction may be supported.

EXAMPLES
char    string[] = "Hello";
// Convert string to "HELLO"
xt_strtr(string, "elo", "ELO", 0);