{"provider_url":"https://hatena.blog","version":"1.0","published":"2007-11-21 00:00:00","description":"\u524d\u306b\u3001wsprintf\u3084sprintf\u306f\u3001\u30d0\u30c3\u30d5\u30a1\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3092\u9632\u3052\u306a\u304f\u3066\u53c2\u3063\u305f\u3001\u3068\u3001\u601d\u3063\u3066\u305f\u3089\u3001 snprintf\u3068\u3044\u3046\u95a2\u6570\u304c\u3042\u3063\u305f\uff08\u3068\u3044\u3046\u306e\u3092\u6700\u8fd1\u77e5\u3063\u305f\uff09\u3002 \u305f\u3068\u3048\u3070\u3053\u3046\u3044\u3046\u30bd\u30fc\u30b9\u3092\u66f8\u304f\u3068\u3001\u3068\u3093\u3067\u3082\u306a\u3044\u4e8b\u306b\u306a\u308b\u3002 #include <stdio.h> int main(int argc, char **argv) { char buf[10]; memset(&buf, 0, sizeof(buf)); sprintf(buf, \"%15s\", \"0123456789abcde\"); printf(\"\u5b9f\u884c\u7d50\u679c\"); printf(buf); return 0; } \u5b9f\u884c\u7d50\u679c 012345\u2026","blog_title":"\u8a18\u9332\uff08e_c_e_t\uff09","title":"\u30d0\u30c3\u30d5\u30a1\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3092\u9632\u3052","blog_url":"https://e-c-e-t.hatenadiary.org/","categories":[],"type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fe-c-e-t.hatenadiary.org%2Fentry%2F20071121\" title=\"\u30d0\u30c3\u30d5\u30a1\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3092\u9632\u3052 - \u8a18\u9332\uff08e_c_e_t\uff09\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"provider_name":"Hatena Blog","width":"100%","height":"190","author_name":"e_c_e_t","url":"https://e-c-e-t.hatenadiary.org/entry/20071121","author_url":"https://blog.hatena.ne.jp/e_c_e_t/"}