{"id":45616,"date":"2023-09-28T22:16:21","date_gmt":"2023-09-28T14:16:21","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=45616"},"modified":"2023-09-28T22:16:21","modified_gmt":"2023-09-28T14:16:21","slug":"hhsjxhzhzfc","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/45616.html","title":{"rendered":"Hexchar\u51fd\u6570\uff1a\u89e3\u6790\u548c\u8f6c\u6362\u5b57\u7b26\u4e32"},"content":{"rendered":"

  Hexchar\u51fd\u6570\u662f\u4e00\u79cd\u7528\u4e8e\u89e3\u6790\u548c\u8f6c\u6362\u5b57\u7b26\u4e32\u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6bcf\u4e2a\u5b57\u7b26\u8f6c\u6362\u4e3a\u5176\u5341\u516d\u8fdb\u5236\u7684\u8868\u793a\u5f62\u5f0f\u3002\u8fd9\u79cd\u51fd\u6570\u5728\u8bb8\u591a\u573a\u666f\u4e2d\u90fd\u6709\u7528\u5904\uff0c\u4f8b\u5982\uff0c\u5f53\u9700\u8981\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5176\u4ed6\u683c\u5f0f\uff0c\u6216\u8005\u5f53\u9700\u8981\u5c06\u5b57\u7b26\u4e32\u4e0e\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u8fdb\u884c\u4ea4\u4e92\u65f6\uff0cHexchar\u51fd\u6570\u90fd\u80fd\u6d3e\u4e0a\u7528\u573a\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecdHexchar\u51fd\u6570\u7684\u7528\u6cd5\uff0c\u4ee5\u53ca\u5b83\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u7684\u4f18\u52bf\u3002<\/p>\n

Hexchar\u51fd\u6570\u7684\u7b80\u4ecb<\/h2>\n

  Hexchar\u51fd\u6570\u662f\u4e00\u79cd\u7528\u4e8e\u89e3\u6790\u548c\u8f6c\u6362\u5b57\u7b26\u4e32\u7684\u51fd\u6570\uff0c\u5b83\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6bcf\u4e2a\u5b57\u7b26\u8f6c\u6362\u4e3a\u5176\u5341\u516d\u8fdb\u5236\u7684\u8868\u793a\u5f62\u5f0f\u3002<\/strong>\u8fd9\u79cd\u51fd\u6570\u53ef\u4ee5\u63a5\u53d7\u4efb\u610f\u957f\u5ea6\u7684\u5b57\u7b26\u4e32\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u5176\u5bf9\u5e94\u7684\u5341\u516d\u8fdb\u5236\u8868\u793a\u5f62\u5f0f\u3002Hexchar\u51fd\u6570\u7684\u7ed3\u679c\u53ef\u4ee5\u662f\u4efb\u610f\u957f\u5ea6\u7684\u5b57\u7b26\u4e32\uff0c\u6bd4\u5982\u201c0x00\u201d\u3001\u201c0xFF\u201d\u7b49\u3002<\/p>\n

  Hexchar\u51fd\u6570\u7684\u5b9e\u73b0<\/h3>\n

  Hexchar\u51fd\u6570\u7684\u5b9e\u73b0\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u4e00\u884c\u4ee3\u7801\u5373\u53ef\u5b9e\u73b0\uff1a<\/p>\n

  String hexString = Hexchar(String str);<\/p><\/pre>\n

  \u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0cstr\u53c2\u6570\u662f\u8981\u8f6c\u6362\u7684\u5b57\u7b26\u4e32\uff0chexString\u53c2\u6570\u662f\u8f6c\u6362\u540e\u7684\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u3002<\/p>\n

  Hexchar\u51fd\u6570\u7684\u5e94\u7528<\/h3>\n

  Hexchar\u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5176\u4ed6\u683c\u5f0f\uff0c\u4f8b\u5982\uff0c\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u4e0e\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u8fdb\u884c\u4ea4\u4e92\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u591a\u7684\u529f\u80fd\u3002\u6b64\u5916\uff0cHexchar\u51fd\u6570\u8fd8\u53ef\u4ee5\u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u4e0e\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u8fdb\u884c\u6bd4\u8f83\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u5b9e\u73b0\u66f4\u52a0\u7cbe\u786e\u7684\u6bd4\u8f83\u3002<\/p>\n

Hexchar\u51fd\u6570\u7684\u4f18\u52bf<\/h2>\n

  Hexchar\u51fd\u6570\u7684\u4f18\u52bf\u5728\u4e8e\u5b83\u53ef\u4ee5\u5c06\u4efb\u610f\u957f\u5ea6\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5176\u5bf9\u5e94\u7684\u5341\u516d\u8fdb\u5236\u8868\u793a\u5f62\u5f0f\uff0c\u4ece\u800c\u5927\u5927\u63d0\u9ad8\u4e86\u5b57\u7b26\u4e32\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u64cd\u4f5c\u6027\u3002\u6b64\u5916\uff0cHexchar\u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u4e0e\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u8fdb\u884c\u4ea4\u4e92\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u591a\u7684\u529f\u80fd\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  Hexchar\u51fd\u6570\u662f\u4e00\u79cd\u7528\u4e8e\u89e3\u6790\u548c\u8f6c\u6362\u5b57\u7b26\u4e32\u7684\u51fd\u6570\uff0c\u5b83\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6bcf\u4e2a\u5b57\u7b26\u8f6c\u6362\u4e3a\u5176\u5341\u516d\u8fdb\u5236\u7684\u8868\u793a\u5f62\u5f0f\u3002<\/strong>Hexchar\u51fd\u6570\u7684\u4f18\u52bf\u5728\u4e8e\u5b83\u53ef\u4ee5\u5c06\u4efb\u610f\u957f\u5ea6\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5176\u5bf9\u5e94\u7684\u5341\u516d\u8fdb\u5236\u8868\u793a\u5f62\u5f0f\uff0c\u4ece\u800c\u5927\u5927\u63d0\u9ad8\u4e86\u5b57\u7b26\u4e32\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u64cd\u4f5c\u6027\u3002\u6b64\u5916\uff0cHexchar\u51fd\u6570\u8fd8\u53ef\u4ee5\u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u4e0e\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u8fdb\u884c\u4ea4\u4e92\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u591a\u7684\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Hexchar\u51fd\u6570\u662f\u4e00\u79cd\u7528\u4e8e\u89e3\u6790\u548c\u8f6c\u6362\u5b57\u7b26\u4e32\u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6bcf\u4e2a\u5b57\u7b26\u8f6c\u6362\u4e3a\u5176\u5341\u516d\u8fdb\u5236\u7684\u8868\u793a\u5f62\u5f0f\u3002\u8fd9\u79cd\u51fd\u6570\u5728\u8bb8\u591a\u573a\u666f\u4e2d\u90fd\u6709\u7528\u5904\uff0c\u4f8b\u5982\uff0c\u5f53\u9700\u8981\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5176\u4ed6\u683c\u5f0f<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","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":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-45616","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/45616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=45616"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/45616\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=45616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=45616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=45616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}