{"id":5739,"date":"2012-11-12T10:09:28","date_gmt":"2012-11-12T01:09:28","guid":{"rendered":"http:\/\/www.gesource.jp\/weblog\/?p=5739"},"modified":"2017-07-16T10:54:16","modified_gmt":"2017-07-16T01:54:16","slug":"jcl%e3%81%aestrtostrings%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e5%88%86%e5%89%b2%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.gesource.jp\/weblog\/?p=5739","title":{"rendered":"JCL\u306eStrToStrings\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3059\u308b"},"content":{"rendered":"<p>StrToStrings\u3092\u4f7f\u3046\u306b\u306f\u3001JclStrings.hpp\u3092include\u3057\u307e\u3059\u3002<\/p>\n<pre><code>#include &lt;JclStrings.hpp&gt;\n<\/code><\/pre>\n<p>\u203bAnsiString\u7248\u3092\u4f7f\u3046\u3068\u304d\u306fJclAnsiStrings.hpp\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre><code>#include &lt;JclAnsiStrings.hpp&gt;\n<\/code><\/pre>\n<p>StrToStrings\u306e\u5b9a\u7fa9\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>extern PACKAGE void __fastcall StrToStrings(\n  System::UnicodeString S, \n  System::UnicodeString Sep, \n  System::Classes::TStrings* const List, \n  const bool AllowEmptyString = true);\n<\/code><\/pre>\n<p>\u5f15\u6570S\u306f\u5206\u5272\u3059\u308b\u6587\u5b57\u5217\u3001\u5f15\u6570Sep\u306f\u533a\u5207\u308a\u6587\u5b57\u3001\u5f15\u6570List\u306f\u5206\u5272\u3057\u305f\u6587\u5b57\u5217\u3092\u767b\u9332\u3059\u308b\u30ea\u30b9\u30c8\u3067\u3059\u3002<br \/>\n\u5f15\u6570AllowEmptyString\u304cfalse\u306e\u3068\u304d\u306f\u7a7a\u6587\u5b57\u306f\u7d50\u679c\u304b\u3089\u9664\u5916\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e01<\/p>\n<pre><code>\/\/\u5206\u5272\u3059\u308b\u6587\u5b57\u5217\nUnicodeString S = \"\u30a4\u30fc\u30b8\u30b9|\u30d0\u30b9\u30bf\u30fc|\u30c7\u30e5\u30a8\u30eb|\u30d6\u30ea\u30c3\u30c4|\u30b9\u30c8\u30e9\u30a4\u30af\";\n\/\/\u533a\u5207\u308a\u6587\u5b57\nUnicodeString Sep = \"|\";\n\/\/\u5206\u5272\u3057\u305f\u6587\u5b57\u5217\u306e\u30ea\u30b9\u30c8\nTStringList* List = new TStringList();\nStrToStrings(S, Sep, List);\nMemo1-&gt;Lines-&gt;Assign(List);\n<\/code><\/pre>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2012\/11\/0011.gif?resize=195%2C135\" alt=\"\" title=\"\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e01\" width=\"195\" height=\"135\" class=\"alignnone size-full wp-image-5740\" \/><\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e02(AllowEmptyString\u306e\u6bd4\u8f03)<\/p>\n<pre><code>\/\/\u5206\u5272\u3059\u308b\u6587\u5b57\u5217\nUnicodeString S = \"\u30a4\u30fc\u30b8\u30b9||\u30d0\u30b9\u30bf\u30fc||||\u30c7\u30e5\u30a8\u30eb|\u30d6\u30ea\u30c3\u30c4|\u30b9\u30c8\u30e9\u30a4\u30af\";\n\/\/\u533a\u5207\u308a\u6587\u5b57\nUnicodeString Sep = \"|\";\n\/\/\u5206\u5272\u3057\u305f\u6587\u5b57\u5217\u306e\u30ea\u30b9\u30c8\nTStringList* List = new TStringList();\n\/\/AllowEmptyString\u304ctrue\u306e\u3068\u304d\nStrToStrings(S, Sep, List, true);\nMemo1-&gt;Lines-&gt;Assign(List);\n\/\/AllowEmptyString\u304cfalse\u306e\u3068\u304d\nStrToStrings(S, Sep, List, false);\nMemo2-&gt;Lines-&gt;Assign(List);\n<\/code><\/pre>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2012\/11\/0021.gif?resize=276%2C187\" alt=\"\" title=\"\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e02(AllowEmptyString\u306e\u6bd4\u8f03)\" width=\"276\" height=\"187\" class=\"alignnone size-full wp-image-5741\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>StrToStrings\u3092\u4f7f\u3046\u306b\u306f\u3001JclStrings.hpp\u3092include\u3057\u307e\u3059\u3002 #include &lt;JclStrings.hpp&gt; \u203bAnsiString\u7248\u3092\u4f7f\u3046\u3068\u304d\u306fJclAnsiStrings. &#8230;<\/p>\n<p><a href=\"https:\/\/www.gesource.jp\/weblog\/?p=5739\" class=\"more-link\">Continue reading &lsquo;JCL\u306eStrToStrings\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3059\u308b&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[16],"tags":[149,112],"class_list":["post-5739","post","type-post","status-publish","format-standard","hentry","category-cbuilder","tag-cbuilder","tag-jvcl"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/5739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5739"}],"version-history":[{"count":0,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/5739\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}