21#ifndef __ANTARES_LIBS_UTILS_HXX__
22#define __ANTARES_LIBS_UTILS_HXX__
26#include <yuni/core/string.h>
30template<
class StringT>
31void TransformNameIntoID(
const AnyString& name, StringT& out)
36 out.reserve(name.size());
38 for (uint i = 0; i != name.size(); ++i)
40 const char c = name[i];
41 if ((c >=
'a' and c <=
'z') or (c >=
'A' and c <=
'Z') or (c >=
'0' and c <=
'9')
42 or c ==
'_' or c ==
'-' or c ==
'(' or c ==
')' or c ==
',' or c ==
'&' or c ==
' ')
62 out <<
"id_" << ((size_t)(&out));
67void TransformNameIntoID(
const AnyString& name, std::string& out);