blob: 050f3d2c0a7456c2a7780de7e093d5ec4fede2d3 (
plain) (
tree)
|
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
size_t
libpatch_get_zu__(const char *text, size_t len, size_t *out)
{
size_t i = 0, digit;
*out = 0;
for (; i < len; i++) {
digit = (size_t)(text[i] - '0');
if (digit > 9U)
break;
*out = *out * 10U + digit;
}
return i;
}
|