Skip to content
Snippets Groups Projects
Commit aa592e35 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Create replace_chars(), a wrapper for REPLACE_CHARS()

The iteration variable (p) is created on the stack.
parent bf757d69
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -649,8 +649,18 @@ char* replace_named_values(const char* src
*p=0; /* terminate string in destination buffer */
return(buf);
}
}
/****************************************************************************/
/****************************************************************************/
char* replace_chars(char *str, char c1, char c2)
{
char* p;
REPLACE_CHARS(str, c1, c2, p);
return str;
}
/****************************************************************************/
/* Condense consecutive white-space chars in a string to single spaces */
/****************************************************************************/
......
......@@ -44,6 +44,7 @@ DLLEXPORT char * ascii_str(uchar* str);
DLLEXPORT char * replace_named_values(const char* src ,char* buf, size_t buflen,
const char* escape_seq, named_string_t* string_list,
named_int_t* int_list, bool case_sensitive);
DLLEXPORT char * replace_chars(char *str, char c1, char c2);
DLLEXPORT char * condense_whitespace(char* str);
DLLEXPORT char exascii_to_ascii_char(uchar ch);
DLLEXPORT char * convert_ansi(const char* src, char* dest, size_t, int width, bool ice_color);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment