util/string: add ascii_to for unsigned short

Ref #2670
This commit is contained in:
Martin Stein 2018-02-11 14:46:43 +01:00 committed by Christian Helmuth
parent eb11e077fc
commit 8c65219c96

View File

@ -342,6 +342,17 @@ namespace Genode {
}
/**
* Read unsigned short value from string
*
* \return number of consumed characters
*/
inline size_t ascii_to(const char *s, unsigned short &result)
{
return ascii_to_unsigned(s, result, 0);
}
/**
* Read unsigned long value from string
*