{"id":1381,"date":"2010-11-06T17:40:00","date_gmt":"2010-11-06T09:40:00","guid":{"rendered":""},"modified":"2013-11-17T16:34:20","modified_gmt":"2013-11-17T08:34:20","slug":"delphi2010-string%e3%80%81ansistring%e5%8f%8atbytes%e4%b9%8b%e9%97%b4%e7%9a%84%e8%bd%ac%e6%8d%a2","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/1381.html","title":{"rendered":"Delphi2010 String\u3001ANSIString\u53caTBytes\u4e4b\u95f4\u7684\u8f6c\u6362"},"content":{"rendered":"<p>\u4e00\u3001string\u8f6c\u4e3aansistring<br \/>\n1\u3001\u76f4\u63a5\u8d4b\u503c \uff08\u6709\u8b66\u544a\uff09<br \/>\n2\u3001ansistring()\u7c7b\u578b\u5f3a\u5236\u8f6c\u6362\u3002\uff08\u65e0\u8b66\u544a\uff09<\/p>\n<p>\u4e8c\u3001ansistring \u8f6c\u4e3astring<\/p>\n<p>1\u3001\u76f4\u63a5\u8d4b\u503c \uff08\u6709\u8b66\u544a\uff09<br \/>\n2\u3001string()\u7c7b\u578b\u5f3a\u5236\u8f6c\u6362\u3002\uff08\u65e0\u8b66\u544a\uff09<\/p>\n<p>\u4e09\u3001string \u8f6c\u4e3aTbytes<\/p>\n<p>1\u3001bytes:= bytesof(str) <wbr>\u5df2\u8f6c\u4e3aansi\u7f16\u7801<br \/>\n2\u3001bytes:= widebytesof(str) UNICODE \u7f16\u7801<\/wbr><\/p>\n<p>\u56db\u3001ansistring \u8f6c\u4e3aTbytes<\/p>\n<p>1\u3001bytes:= bytesof(str) <wbr>ansi\u7f16\u7801<br \/>\n2\u3001bytes:= widebytesof(string(str)) UNICODE \u7f16\u7801<\/wbr><\/p>\n<p>\u4e94\u3001Tbytes \u8f6c\u4e3astring<\/p>\n<p>1\u3001 str:=stringof(bytes) <wbr>Tbytes \u4e3aansi\u7f16\u7801<br \/>\n2\u3001 str:=widestringof(bytes) <wbr>Tbytes \u4e3aunicode\u7f16\u7801<\/wbr><\/wbr><\/p>\n<p>\u516d\u3001PChar\u8f6cString<\/p>\n<p>\u7528StrPas\u51fd\u6570\uff0cStrPas(PChar):AnsiString;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001string\u8f6c\u4e3aansistring 1\u3001\u76f4\u63a5\u8d4b\u503c \uff08\u6709\u8b66\u544a\uff09 2\u3001ansistring()\u7c7b\u578b\u5f3a\u5236\u8f6c\u6362\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1381","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=1381"}],"version-history":[{"count":1,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1381\/revisions"}],"predecessor-version":[{"id":4691,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1381\/revisions\/4691"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=1381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=1381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=1381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}