Commit 202f2fe6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add uni_atoi for string arg

parent a76b36e0
...@@ -205,6 +205,7 @@ namespace UniSetTypes ...@@ -205,6 +205,7 @@ namespace UniSetTypes
long setoutregion(long raw, long rawMin, long rawMax); long setoutregion(long raw, long rawMin, long rawMax);
/// ( 0x, 16-)
inline int uni_atoi( const char* str ) inline int uni_atoi( const char* str )
{ {
if (strlen(str) < 3 || toupper(str[1]) != 'X') if (strlen(str) < 3 || toupper(str[1]) != 'X')
...@@ -215,6 +216,10 @@ namespace UniSetTypes ...@@ -215,6 +216,10 @@ namespace UniSetTypes
std::sscanf(str,"%x",&n); std::sscanf(str,"%x",&n);
return n; return n;
} }
inline int uni_atoi( const std::string str )
{
return uni_atoi(str.c_str());
}
bool file_exist( const std::string filename ); bool file_exist( const std::string filename );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment