{"url":"https://boxnos.hatenablog.com/entry/20070811/1186840959","image_url":null,"blog_url":"https://boxnos.hatenablog.com/","blog_title":"\u30dc\u30af\u30ce\u30b9","provider_name":"Hatena Blog","categories":["GCC"],"published":"2007-08-11 23:02:39","type":"rich","width":"100%","version":"1.0","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fboxnos.hatenablog.com%2Fentry%2F20070811%2F1186840959\" title=\" K&amp;R\u3092\u8aad\u3082\u3046(27) \u554f\u984c2-3 htoi - \u30dc\u30af\u30ce\u30b9\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"16\u9032\u6587\u5b57\u5217\u3092\u6570\u5024\u306b\u5909\u63db\u3059\u308bhtoi\u3092\u5b9f\u88c5\u305b\u3088\u30020x\u306e\u3042\u308b\u5834\u5408\u3082\u8003\u616e\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\u3068\u3044\u3046\u554f\u984c\u3002GCC\u62e1\u5f35\u306ecase 'a' ... 'f'\u3092\u4f7f\u3063\u3066\u307f\u305f\u3002 #include <stdio.h> #include <stdlib.h> int htoi(char *s) { unsigned int i = 0; int tmp; if (*s == '0' && *(s + 1) == 'x') s += 2; for (; *s != '\\0'; s++) { tmp = i * 16 + *s; switch(*s) { default: return (int) i; case 'a\u2026","title":" K&R\u3092\u8aad\u3082\u3046(27) \u554f\u984c2-3 htoi","author_name":"tanakaBox","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/tanakaBox/"}