{"id":243,"date":"2013-04-30T13:55:27","date_gmt":"2013-04-30T04:55:27","guid":{"rendered":"http:\/\/cromi.com\/?p=243"},"modified":"2013-04-30T13:56:26","modified_gmt":"2013-04-30T04:56:26","slug":"243","status":"publish","type":"post","link":"http:\/\/cromi.com\/?p=243","title":{"rendered":"C# \ubb38\uc790\uc5f4 \ubd84\ud560 \ud558\uae30 ( String.Split)"},"content":{"rendered":"<pre lang=\"csharp\">\r\nclass TestStringSplit\r\n{\r\n    static void Main()\r\n    {\r\n        char[] delimiterChars = { ' ', ',', '.', ':', '\\t' };\r\n\r\n        string text = \"one\\ttwo three:four,five six seven\";\r\n        System.Console.WriteLine(\"Original text: '{0}'\", text);\r\n\r\n        string[] words = text.Split(delimiterChars);\r\n        System.Console.WriteLine(\"{0} words in text:\", words.Length);\r\n\r\n        foreach (string s in words)\r\n        {\r\n            System.Console.WriteLine(s);\r\n        }\r\n\r\n        \/\/ Keep the console window open in debug mode.\r\n        System.Console.WriteLine(\"Press any key to exit.\");\r\n        System.Console.ReadKey();\r\n    }\r\n}\r\n\/* Output:\r\n    Original text: 'one     two three:four,five six seven'\r\n    7 words in text:\r\n    one\r\n    two\r\n    three\r\n    four\r\n    five\r\n    six\r\n    seven\r\n *\/\r\n\r\n\/\/ \uc694\uae30 \uae4c\uc9c0\ub294  MSDN \uc5d0 \uc788\ub294 \ub0b4\uc6a9  \uc880\ub354 \uc27d\uac8c..\r\n\r\n\r\nstrInData = \"-000.66 000.59-000.95-000.06 0745.1 0000.0\";  \r\n\/\/  \uc798\ub77c\ub0bc \ubb38\uc790\uc5f4 \uc804\uccb4 \r\n\r\nchar[] delimiterChars = { ' ', '-' };   \r\n\/\/ \ubb38\uc790\uc5f4\uc5d0\uc11c  \uacf5\ubc31 \uacfc - \ubb38\uc790\ub85c \uad6c\ubd84\r\n\r\nstring[] words = strInData.Split(delimiterChars);   \r\n  \/\/ \ud574\ub2f9 \uad6c\ubd84\uc790\ub85c \ubb38\uc790\uc5f4\uc744 \uad6c\ubd84 \uc2dc\ud0a4\ub294 \ub77c\uc778\r\n\r\n\/\/ \uacb0\uacfc  \r\nwords[0]= \"\"\r\nwords[1]= \"000.66\"\r\nwords[2]= \"000.59\"\r\nwords[3]= \"000.95\"\r\nwords[4]= \"000.06\" \r\nwords[5]= \"0745.1\"\r\nwords[6]= \"0000.0\"\r\n\r\n\/\/ \uc774\uc0c1  \ud574\ud53c\ud55c \ucf54\ub529 \ud558\uc138\uc694~~!!!!\r\n<\/pre>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>class TestStringSplit { static void Main() { char[] delimiterChars = { &#8216; &#8216;, &#8216;,&#8217;, &#8216;.&#8217;, &#8216;:&#8217;, &#8216;\\t&#8217; }; string text = &#8220;one\\ttwo three:four,five six seven&#8221;; System.Console.WriteLine(&#8220;Original text: &#8216;{0}'&#8221;, text); string[] words = text.Split(delimiterChars); System.Console.WriteLine(&#8220;{0} words in text:&#8221;, words.Length); foreach (string s in words) { System.Console.WriteLine(s); } \/\/ Keep the console window open in debug mode. [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[16,54,89],"class_list":["post-243","post","type-post","status-publish","format-standard","hentry","category-vs2008","tag-c","tag-c-2008","tag-c-"],"_links":{"self":[{"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts\/243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=243"}],"version-history":[{"count":5,"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts\/243\/revisions"}],"predecessor-version":[{"id":400,"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts\/243\/revisions\/400"}],"wp:attachment":[{"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=243"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}