mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 00:25:48 -04:00
fixes required by review of pr1700
This commit is contained in:
parent
5223ff751a
commit
7aa51423a4
13 changed files with 98 additions and 154 deletions
|
@ -205,6 +205,19 @@ bool ConvertUtf16ToUtf8(const std::wstring& source, std::string& dest)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool is_alphanumeric(char c)
|
||||
{
|
||||
return (c>='0' && c<'9') || (c>='a' && c<='z') || (c>='A' && c<='Z') ;
|
||||
}
|
||||
|
||||
bool is_alphanumeric(const std::string& s)
|
||||
{
|
||||
for(uint32_t i=0;i<s.size();++i)
|
||||
if(!is_alphanumeric(s[i]))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
} } // librs::util
|
||||
|
||||
#ifdef WINDOWS_SYS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue