![]() |
![]()
| ![]() |
![]()
NAMExt_strtr() - Library function equivalent of tr(1) LIBRARY#include <xtend/string.h> -lxtend SYNOPSISvoid xt_strtr(char *string, const char *from, const char *to, int flags) ARGUMENTSstring 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) DESCRIPTIONTranslate 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. EXAMPLESchar string[] = "Hello"; // Convert string to "HELLO" xt_strtr(string, "elo", "ELO", 0);
|