{"id":930,"date":"2018-09-17T18:32:08","date_gmt":"2018-09-17T09:32:08","guid":{"rendered":"https:\/\/chat-messenger.com\/?p=930"},"modified":"2018-12-23T02:00:32","modified_gmt":"2018-12-22T17:00:32","slug":"%e0%b9%84%e0%b8%9f%e0%b8%a5%e0%b9%8c%e0%b9%84%e0%b8%94%e0%b9%89%e0%b8%a3%e0%b8%b1%e0%b8%9a%e0%b8%84%e0%b8%b3%e0%b8%95%e0%b9%88%e0%b8%ad%e0%b8%97%e0%b9%89%e0%b8%b2%e0%b8%a2","status":"publish","type":"post","link":"https:\/\/chat-messenger.com\/th\/blog\/java\/file-getsuffix","title":{"rendered":"\u0e23\u0e31\u0e1a\u0e19\u0e32\u0e21\u0e2a\u0e01\u0e38\u0e25\u0e44\u0e1f\u0e25\u0e4c\u0e08\u0e32\u0e01\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c Java"},"content":{"rendered":"<h2 class=\"common_title\"><a name=\"0\">\u0e0a\u0e27\u0e32 <strong>\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c<\/strong>\u3001<strong>\u0e40\u0e2a\u0e49\u0e19\u0e17\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c<\/strong>\u0e08\u0e32\u0e01<strong>\u0e19\u0e32\u0e21\u0e2a\u0e01\u0e38\u0e25\u0e44\u0e1f\u0e25\u0e4c<\/strong>\u0e23\u0e31\u0e1a<\/a><\/h2>\n<p>\n\u0e43\u0e19\u0e20\u0e32\u0e29\u0e32\u0e08\u0e32\u0e27\u0e32<strong>\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c<\/strong>\u0e08\u0e32\u0e01<strong>\u0e19\u0e32\u0e21\u0e2a\u0e01\u0e38\u0e25\u0e44\u0e1f\u0e25\u0e4c<\/strong>\u0e19\u0e35\u0e48\u0e04\u0e37\u0e2d\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e0b\u0e2d\u0e23\u0e4c\u0e2a\u0e42\u0e04\u0e49\u0e14\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e14\u0e36\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\n<\/p>\n<h2 class=\"common_title\"><a name=\"1\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21<\/a><\/h2>\n<pre class=\"sample_src\">\/**\r\n * \u30d5\u30a1\u30a4\u30eb\u540d\u304b\u3089\u62e1\u5f35\u5b50\u3092\u8fd4\u3057\u307e\u3059\u3002\r\n * @param fileName \u30d5\u30a1\u30a4\u30eb\u540d\r\n * @return \u30d5\u30a1\u30a4\u30eb\u306e\u62e1\u5f35\u5b50\r\n *\/\r\npublic static String getSuffix(String fileName) {\r\n    if (fileName == null)\r\n        return null;\r\n    int point = fileName.lastIndexOf(\".\");\r\n    if (point != -1) {\r\n        return fileName.substring(point + 1);\r\n    }\r\n    return fileName;\r\n}\r\n<\/pre>\n<p><script type=\"text\/javascript\" src=\"https:\/\/chat-messenger.com\/js\/common.js?dd12sssas2223\" charset=\"UTF-8\"><\/script><br \/>\n<script type=\"text\/javascript\"> writePR(); <\/script><\/p>\n<h2 class=\"common_title\"><a name=\"2\">\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23<\/a><\/h2>\n<p>\u25c6\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07<\/p>\n<pre class=\"sample_src\">\/** * \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 * @param args *\/ public static void main(String[] args) { String ret1 = getSuffix(&quot;test.html&quot;); System.out.println(ret1); String ret2 = getSuffix(&quot;C:\\\\test.html&quot;); System.out.println(ret2); }\r\n<\/pre>\n<p>\u25c6\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c<\/p>\n<pre class=\"console\">html html\r\n\r\n<\/pre>","protected":false},"excerpt":{"rendered":"<p>Java \u30d5\u30a1\u30a4\u30eb\u540d\u3001\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u304b\u3089\u62e1\u5f35\u5b50\u3092\u53d6\u5f97 Java\u3067\u30d5\u30a1\u30a4\u30eb\u540d\u304b\u3089\u62e1\u5f35\u5b50\u3092\u53d6\u5f97\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u3067\u3059 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[19],"tags":[],"class_list":["post-930","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/comments?post=930"}],"version-history":[{"count":4,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/930\/revisions"}],"predecessor-version":[{"id":1889,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/930\/revisions\/1889"}],"wp:attachment":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/media?parent=930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/categories?post=930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/tags?post=930"}],"curies":[{"name":"\u0e14\u0e31\u0e1a\u0e40\u0e1a\u0e34\u0e25\u0e22\u0e39\u0e1e\u0e35","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}