{"id":1417,"date":"2014-12-09T21:59:01","date_gmt":"2014-12-09T13:59:01","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=1417"},"modified":"2014-12-09T21:59:01","modified_gmt":"2014-12-09T13:59:01","slug":"qdac%e6%96%b0%e7%bb%84%e4%bb%b6-qmacros%e5%8f%91%e5%b8%83%ef%bc%8c%e7%94%a8%e4%ba%8e%e6%94%af%e6%8c%81%e5%bf%ab%e9%80%9f%e6%a8%a1%e6%9d%bf%e6%9b%bf%e6%8d%a2","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=1417","title":{"rendered":"QDAC\u65b0\u7ec4\u4ef6-QMacros\u53d1\u5e03\uff0c\u7528\u4e8e\u652f\u6301\u5feb\u901f\u6a21\u677f\u66ff\u6362"},"content":{"rendered":"<p>QMacros\u662fQDAC\u7684\u4e00\u4e2a\u65b0\u7684\u7ec4\u6210\u90e8\u5206\uff0c\u91c7\u7528\u5b8f\u5b9a\u4e49\u7684\u65b9\u5f0f\u6765\u5feb\u901f\u66ff\u6362\u590d\u6742\u7684\u6587\u672c\u5185\u5bb9\u6a21\u677f\u3002\u5982\u4e0b\u9762\u7684\u4e00\u53e5\u8bdd\uff1a<\/p>\n<p>My Name is &lt;%Name%&gt;,Please call me &lt;%FirstName%&gt;<\/p>\n<p>\u6211\u4eec\u5b9a\u4e49\u5982\u4e0b\u5b8f\uff1a<\/p>\n<p>Name =&gt;Jone Stand<\/p>\n<p>FirstName =&gt;\u00a0Jone<\/p>\n<p>\u4f7f\u7528QMacros\u6267\u884c\u4e0b\u9762\u7684\u66ff\u6362\u64cd\u4f5c\u540e\uff1a<\/p>\n<pre class=\"lang:delphi decode:true\">AMacroMgr := TQMacroManager.Create;\r\nAMacroMgr.Push('Name',Jone Stand');\r\nAMacroMgr.Push('FirstName','Jone');\r\nS:=AMacroMgr.Replace('My Name is &lt;%Name%&gt;,Please call me &lt;%FirstName%&gt;', '&lt;%','%&gt;',0);\r\n<\/pre>\n<p>\u6b64\u65f6\u5b57\u7b26\u4e32S\u7684\u503c\u5373\u4e3a\uff1a<\/p>\n<p>My Name is Jone Stand,Please call me Jone<\/p>\n<p>\u5177\u4f53\u4f7f\u7528\u65b9\u6cd5\u8bf7\u5230\u4e0b\u8f7d QDAC \u65b0\u7248\u5230 Demos\\Delphi\\VCL\\QMacros \u76ee\u5f55\u4e0b\u67e5\u770b\u793a\u4f8b\u7a0b\u5e8f\u53ca\u6e90\u7801\u4e2d\u76f8\u5173\u51fd\u6570\u6ce8\u91ca\u8bf4\u660e\u3002<\/p>\n<p><a href=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/12\/macros.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1418 size-full\" src=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/12\/macros.jpg\" alt=\"macros\" width=\"610\" height=\"395\" srcset=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/12\/macros.jpg 610w, https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/12\/macros-300x194.jpg 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>QMacros\u662fQDAC\u7684\u4e00\u4e2a\u65b0\u7684\u7ec4\u6210\u90e8 [&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,9,214,3],"tags":[217,216,215,218],"class_list":["post-1417","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-qdac","category-qmacros","category-pub","tag-217","tag-216","tag-215","tag-218"],"views":3728,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/1417","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=1417"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/1417\/revisions"}],"predecessor-version":[{"id":1419,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/1417\/revisions\/1419"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}