MXS-1220: Deprecate whitespace in object names
All whitespace in object names is now converted to a compacted format with whitespace replaced with hyphens. If a conversion takes place, a warning is logged. Converted some of the tests into C++ as they directly include .cc files.
This commit is contained in:

committed by
Markus Mäkelä

parent
aa16980cec
commit
47c1e9d533
@ -490,6 +490,22 @@ char* trim(char *str)
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace whitespace with hyphens
|
||||
*
|
||||
* @param str String to replace
|
||||
*/
|
||||
void replace_whitespace(char* str)
|
||||
{
|
||||
for (char* s = str; *s; s++)
|
||||
{
|
||||
if (isspace(*s))
|
||||
{
|
||||
*s = '-';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace all whitespace with spaces and squeeze repeating whitespace characters
|
||||
*
|
||||
|
Reference in New Issue
Block a user