
{"id":18574,"date":"2010-04-12T21:15:34","date_gmt":"2010-04-12T15:45:34","guid":{"rendered":"http:\/\/www.jeffrin.in\/?p=1333"},"modified":"2010-04-12T21:15:34","modified_gmt":"2010-04-12T15:45:34","slug":"wcwidth-programming-2","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/04\/12\/wcwidth-programming-2\/","title":{"rendered":"wcwidth &#8211; determine columns needed for a wide character"},"content":{"rendered":"<h2><u>UNIX  API<\/u><\/h2>\n<pre>\nwcwidth - determine columns needed for a wide character\n<\/pre>\n<p><\/p>\n<h2><u>API Explanation Code<\/u><\/h2>\n<pre class=\"brush:c\">\n#define _XOPEN_SOURCE\n#include &lt;wchar.h&gt;\n#include&lt;stdio.h&gt;\n\nmain()\n{\nint value;\nwchar_t cr;\ncr='H';\nvalue=wcwidth(cr);\nprintf(\"n %d n\",value);\n}\n<\/pre>\n<p><a href=\"http:\/\/gcc.gnu.org\/ml\/gcc-bugs\/2000-10\/msg00540.html\">http:\/\/gcc.gnu.org\/ml\/gcc-bugs\/2000-10\/msg00540.html <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>UNIX API wcwidth &#8211; determine columns needed for a wide character API Explanation Code #define _XOPEN_SOURCE #include &lt;wchar.h&gt; #include&lt;stdio.h&gt; main() { int value; wchar_t cr; cr=&#8217;H&#8217;; value=wcwidth(cr); printf(&#8220;n %d n&#8221;,value); } http:\/\/gcc.gnu.org\/ml\/gcc-bugs\/2000-10\/msg00540.html<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"page-templates\/full-width.php","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18574"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=18574"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18574\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=18574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=18574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=18574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}