{"id":42,"date":"2002-06-20T02:20:09","date_gmt":"2002-06-20T02:20:09","guid":{"rendered":"http:\/\/dev.jblove.net\/?p=42"},"modified":"2002-06-20T02:20:09","modified_gmt":"2002-06-20T02:20:09","slug":"%ed%83%9c%ea%b7%b8-%ec%83%81%ea%b4%80%ec%97%86%ec%9d%b4-%ed%95%9c%ea%b8%80-%eb%ac%b8%ec%9e%90%ec%97%b4-%ec%9e%90%eb%a5%b4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/jblove.net\/?p=42","title":{"rendered":"\ud0dc\uadf8 \uc0c1\uad00\uc5c6\uc774 \ud55c\uae00 \ubb38\uc790\uc5f4 \uc790\ub974\uae30"},"content":{"rendered":"<p>\n\/************************************************************** <br \/>\n* $String : \uc6d0\ubcf8 \ubb38\uc790\uc5f4 * <br \/>\n* $MaxLen : \uc790\ub97c \ubb38\uc790\uc5f4 \uae38\uc774 * <br \/>\n* $ShortenStr : \ub9d0\uc904\uc784 \ubb38\uc790\uc5f4 * <br \/>\n***************************************************************\/ <\/p>\n<p>function Shorten_String($String, $MaxLen, $ShortenStr) { <\/p>\n<p>$StringLen = strlen($String); \/\/ \uc6d0\ub798 \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub97c \uad6c\ud568 <\/p>\n<p>for ($i = 0, $count = 0, $tag = 0; $i <= $StringLen &#038;&#038; $count < $MaxLen; $i++ ) { <br \/>\n$LastStr = substr($String, $i, 1); <br \/>\nif ($LastStr == &#8216;<') $tag = 1; \/\/ \ud0dc\uadf8 \uc2dc\uc791 <br \/>\nif ($tag &#038;&#038; $LastStr == &#8216;>&#8217;) { $tag = 0; continue; } \/\/ \ud0dc\uadf8 \ub05d <br \/>\nif ($tag) continue; <br \/>\nif ( ord($LastStr) > 127 ) { $count++; $i++; } <br \/>\n$count++; <br \/>\n\/\/ 2\ubc14\uc774\ud2b8\ubb38\uc790\ub77c\uace0 \uc0dd\uac01\ub418\uba74 $i\ub97c 1\uc744 \ub354 \uc99d\uac00\uc2dc\ucf1c <br \/>\n\/\/ \uacb0\uad6d\uc740 2\uac00 \uc99d\uac00\ud558\uac8c \ub41c\ub2e4. <br \/>\n\/\/ \ub2e4\uc74c\uc5d0 \uc624\ub294 1\ubc14\uc774\ud2b8\ub294 \ub2f9\uc5f0 \uc9c0\uae08 \ubc14\uc774\ud2b8\uc758 \ubb38\uc790\uc5d0 \uadc0\uc18d\ub418\ub294 \ubb38\uc790\uc774\ub2e4. <\/p>\n<p>} <\/p>\n<p>$RetStr = substr($String, 0, $i); <br \/>\n\/\/ \uc704\uc5d0\uc11c \uad6c\ud55c \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub9cc\ud07c\uc73c\ub85c \uc790\ub978\ub2e4. <br \/>\nif ($count<$MaxLen) <br \/>\nreturn $RetStr; <br \/>\nelse <br \/>\nreturn $RetStr .= $ShortenStr; <br \/>\n\/\/ \uc5ec\uae30\uc5d0 \ub9d0\uc904\uc784\ubb38\uc790\ub97c \ubd99\uc5ec\uc11c \ub9ac\ud134\ud574\uc900\ub2e4. <br \/>\n}  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/************************************************************** * $String : \uc6d0\ubcf8 \ubb38\uc790\uc5f4 * * $MaxLen : \uc790\ub97c \ubb38\uc790\uc5f4 \uae38\uc774 * * $ShortenStr : \ub9d0\uc904\uc784 \ubb38\uc790\uc5f4 * ***************************************************************\/ function Shorten_String($String, $MaxLen, $ShortenStr) { $StringLen = strlen($String); \/\/ \uc6d0\ub798 \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub97c \uad6c\ud568 for ($i = 0, $count = 0, $tag = 0; $i<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[51],"tags":[],"class_list":["post-42","post","type-post","status-publish","format-standard","hentry","category-papa-php"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":0,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}