On 06/24/2011 02:39 PM, Michal Vyskocil wrote:
> +int isdigits(const char* str) {
> +        size_t i;
> +
> +        if (!str)
> +                return 0;
> +
> +        for (i = 0; i != strlen(str); i++) {
> +                if (!isdigit(str[i]))
> +                        return 0;
> +        }
Quadratic behaviour? What aboout
          while(*str)
                if(!isdigit(*str++))
                        return 0;

Best,
Zbyszek
                
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to