{"id":4302,"date":"2016-11-12T13:47:07","date_gmt":"2016-11-12T05:47:07","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=4302"},"modified":"2016-11-12T13:47:40","modified_gmt":"2016-11-12T05:47:40","slug":"qstring-%e6%96%b0%e5%a2%9e-deletesidecharsw-%e5%87%bd%e6%95%b0%e7%94%a8%e6%b3%95%e8%af%b4%e6%98%8e","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=4302","title":{"rendered":"[QString] \u65b0\u589e DeleteSideCharsW \u51fd\u6570\u7528\u6cd5\u8bf4\u660e"},"content":{"rendered":"<p>\u6709\u4e9b\u573a\u666f\u4e0b\uff0c\u6211\u4eec\u9700\u8981\u5220\u9664\u4e00\u4e2a\u5b57\u7b26\u4e32\u4e24\u8fb9\u65e0\u7528\u7684\u5b57\u7b26\uff0c\u6bd4\u5982\u7a7a\u767d\uff08\u597d\u5427\uff0c\u522b\u544a\u8bc9\u6211 Trim \uff09\u65f6\u5c31\u53ef\u4ee5\u7528\u5230 DeleteSideCharsW \uff0c\u4e0e Trim \u51fd\u6570\u7684\u4e0d\u540c\u5728\u4e8e\u5b83\u4e0d\u53ea\u80fd\u79fb\u9664\u4e24\u8fb9\u7684\u7a7a\u767d\u5b57\u7b26\uff0c\u8fd8\u53ef\u4ee5\u79fb\u9664\u4e24\u8fb9\u7684\u4e00\u5806\u6307\u5b9a\u7684\u5b57\u7b26\u3002<\/p>\n<p>\u6bd4\u5982\u5bf9\u4e8e\u5b57\u7b26\u4e32&#8221;ahaha Jone ahaha&#8221;\uff0c\u6211\u4eec\u8981\u53ea\u4fdd\u7559\u5176\u4e2d\u7684Jone\uff0c\u5219\u8c03\u7528 DeleteSideCharsW(&#8216;ahaha Jone ahaha&#8217;,&#8217; ah&#8217;) \u00a0\u5c31\u4f1a\u5f97\u5230\u7ed3\u679c &#8220;Jone&#8221;\u3002<\/p>\n<p>\u4e00\u4e2a\u66f4\u5e38\u7528\u7684\u573a\u666f\u662f\u66ff\u4ee3Trim\u79fb\u9664\u4e24\u4fa7\u7684\u5404\u79cd\u7a7a\u767d\u5b57\u7b26\uff08Trim \u53ea\u79fb\u9664\u7a7a\u683c#32\uff09\uff0c\u6bd4\u5982 DeleteSideCharsW(S,&#8217; &#8216;#9#10#13)\u3002<\/p>\n<p>\u770b\u4e0a\u9762\u7684\u4f8b\u5b50\uff0c\u4f60\u4e5f\u5c31\u57fa\u672c\u77e5\u9053\u4e86 DeleteSideChars\u7684\u89c4\u5219\uff1a<\/p>\n<ul>\n<li>\u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u8981\u5904\u7406\u7684\u5b57\u7b26\u4e32<\/li>\n<li>\u7b2c\u4e8c\u4e2a\u53c2\u6570\u662f\u8981\u5728\u4e24\u8fb9\u5220\u9664\u7684\u5b57\u7b26<\/li>\n<li>\u8fd4\u56de\u7684\u662f\u5220\u9664\u540e\u7684\u5b57\u7b26\u4e32<\/li>\n<li>\u5220\u9664\u5728\u4e24\u8fb9\u9047\u5230\u7b2c\u4e00\u4e2a\u4e0d\u8981\u5220\u9664\u7684\u5b57\u7b26\u65f6\u4e2d\u6b62<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u4e9b\u573a\u666f\u4e0b\uff0c\u6211\u4eec\u9700\u8981\u5220\u9664\u4e00\u4e2a\u5b57\u7b26\u4e32\u4e24\u8fb9\u65e0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[69,8,21],"tags":[679,295,225],"class_list":["post-4302","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-misc","tag-679","tag-295","tag-225"],"views":3279,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/4302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4302"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/4302\/revisions"}],"predecessor-version":[{"id":4303,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/4302\/revisions\/4303"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}