mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-12 16:15:43 -04:00
JSON API service and RsThread fixups
This commit is contained in:
parent
f4d7fe4dde
commit
f12ec2b535
6 changed files with 88 additions and 53 deletions
|
@ -207,15 +207,14 @@ bool ConvertUtf16ToUtf8(const std::wstring& source, std::string& dest)
|
|||
|
||||
bool is_alphanumeric(char c)
|
||||
{
|
||||
return (c>='0' && c<'9') || (c>='a' && c<='z') || (c>='A' && c<='Z') ;
|
||||
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;
|
||||
for( uint32_t i=0; i < s.size(); ++i)
|
||||
if(!is_alphanumeric(s[i])) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
} } // librs::util
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue