{"id":298008,"date":"2024-05-20T16:42:20","date_gmt":"2024-05-20T08:42:20","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/298008.html"},"modified":"2024-05-20T16:42:33","modified_gmt":"2024-05-20T08:42:33","slug":"%e5%a6%82%e4%bd%95%e6%8a%8a%e5%b0%8f%e5%86%99%e8%8b%b1%e6%96%87%e5%ad%97%e6%af%8d%e8%bd%ac%e6%8d%a2%e6%88%90%e5%a4%a7%e5%86%99","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/298008.html","title":{"rendered":"\u5982\u4f55\u628a\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u8f6c\u6362\u6210\u5927\u5199"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27145835\/54227b9b-e6fe-4e0d-9ab7-1986635772d8.webp\" alt=\"\u5982\u4f55\u628a\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u8f6c\u6362\u6210\u5927\u5199\" \/><\/p>\n<p><p>\u8981\u5c06\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u8f6c\u6362\u6210\u5927\u5199\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528<strong>\u7f16\u7a0b\u8bed\u8a00\u4e2d\u7684\u5185\u7f6e\u51fd\u6570\u3001\u5728\u7ebf\u8f6c\u6362\u5de5\u5177\u3001\u6587\u672c\u7f16\u8f91\u8f6f\u4ef6\u7684\u683c\u5f0f\u5316\u5de5\u5177\u3001\u4ee5\u53ca\u624b\u52a8\u66ff\u6362<\/strong>\u7b49\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u5728Python\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>.upper()<\/code>\u65b9\u6cd5\u6765\u8f6c\u6362\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u5c0f\u5199\u5b57\u6bcd\u5230\u5927\u5199\u3002\u8fd9\u4e2a\u65b9\u6cd5\u7b80\u5355\u6613\u7528\uff0c\u975e\u5e38\u9002\u5408\u9700\u8981\u5728\u7f16\u7a0b\u6216\u81ea\u52a8\u5316\u6587\u672c\u5904\u7406\u4e2d\u8f6c\u6362\u5b57\u6bcd\u5927\u5c0f\u5199\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u7f16\u7a0b\u8bed\u8a00\u7684\u5185\u7f6e\u51fd\u6570<\/h3>\n<\/p>\n<p><p>\u5728\u591a\u6570\u7f16\u7a0b\u8bed\u8a00\u4e2d\uff0c\u90fd\u6709\u5185\u7f6e\u7684\u51fd\u6570\u6216\u65b9\u6cd5\u6765\u5e2e\u52a9\u5f00\u53d1\u8005\u5b9e\u73b0\u5c0f\u5199\u5230\u5927\u5199\u7684\u8f6c\u6362\u3002\u4ee5<strong>Python<\/strong>\u4e3a\u4f8b\uff0c\u5229\u7528<code>.upper()<\/code>\u65b9\u6cd5\u80fd\u591f\u975e\u5e38\u7b80\u5355\u5730\u5b9e\u73b0\u8f6c\u6362\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h4>1. Python\u4e2d\u7684.upper()\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u662f\u5bf9\u8c61\uff0c\u8fd9\u610f\u5473\u7740\u5b57\u7b26\u4e32\u62e5\u6709\u53ef\u4ee5\u6267\u884c\u7684\u65b9\u6cd5\u3002<code>.upper()<\/code>\u5c31\u662f\u5176\u4e2d\u4e4b\u4e00\uff0c\u5b83\u4e0d\u9700\u8981\u53c2\u6570\uff0c\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u5c0f\u5199\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\u5b57\u6bcd\u3002\u4f7f\u7528\u65b9\u5f0f\u975e\u5e38\u7b80\u5355\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;hello world&quot;<\/p>\n<p>print(text.upper())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd0\u884c\u4e0a\u8ff0\u4ee3\u7801\uff0c\u8f93\u51fa\u5c06\u4f1a\u662f<code>HELLO WORLD<\/code>\u3002<\/p>\n<\/p>\n<p><h4>2. Java\u4e2d\u7684.toUpperCase() \u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u4e0ePython\u7c7b\u4f3c\uff0cJava\u4e2d\u4e5f\u6709\u5c06\u5c0f\u5199\u5b57\u6bcd\u8f6c\u6362\u6210\u5927\u5199\u7684\u65b9\u6cd5\u3002\u5728Java\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>String<\/code>\u7c7b\u7684<code>.toUpperCase()<\/code>\u65b9\u6cd5\u5b9e\u73b0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-java\">String text = &quot;hello world&quot;;<\/p>\n<p>System.out.println(text.toUpperCase());<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u540c\u6837\u4f1a\u8f93\u51fa\u5168\u90e8\u5927\u5199\u7684<code>HELLO WORLD<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u5728\u7ebf\u8f6c\u6362\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u7f16\u7a0b\u4e4b\u5916\uff0c\u4e92\u8054\u7f51\u4e0a\u8fd8\u6709\u8bb8\u591a\u5728\u7ebf\u5de5\u5177\u53ef\u4ee5\u76f4\u63a5\u5c06\u5c0f\u5199\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\uff0c\u8fd9\u4e9b\u5de5\u5177\u975e\u5e38\u9002\u5408\u975e\u7f16\u7a0b\u4eba\u5458\u6216\u4e34\u65f6\u9700\u8981\u5feb\u901f\u8f6c\u6362\u6587\u672c\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528\u5728\u7ebf\u8f6c\u6362\u5de5\u5177<\/h4>\n<\/p>\n<p><p>\u8fd9\u4e9b\u5728\u7ebf\u5de5\u5177\u901a\u5e38\u62e5\u6709\u7b80\u5355\u7684\u7528\u6237\u754c\u9762\uff0c\u7528\u6237\u53ea\u9700\u8981\u5c06\u9700\u8981\u8f6c\u6362\u7684\u6587\u672c\u7c98\u8d34\u5230\u6307\u5b9a\u533a\u57df\uff0c\u7136\u540e\u70b9\u51fb\u4e00\u4e2a\u6309\u94ae\uff0c\u8f6c\u6362\u540e\u7684\u6587\u672c\u5c31\u4f1a\u7acb\u5373\u663e\u793a\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u5feb\u901f\u4e14\u4e0d\u9700\u8981\u5b89\u88c5\u4efb\u4f55\u8f6f\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>2. \u6ce8\u610f\u4e8b\u9879<\/h4>\n<\/p>\n<p><p>\u867d\u7136\u5728\u7ebf\u8f6c\u6362\u5de5\u5177\u975e\u5e38\u4fbf\u6377\uff0c\u4f46\u5728\u5904\u7406\u654f\u611f\u6216\u9690\u79c1\u6570\u636e\u65f6\u9700\u8981\u8c28\u614e\uff0c\u56e0\u4e3a\u4e0d\u662f\u6240\u6709\u7684\u5728\u7ebf\u5de5\u5177\u90fd\u80fd\u591f\u4fdd\u8bc1\u6570\u636e\u7684\u5b89\u5168\u6027\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u6587\u672c\u7f16\u8f91\u8f6f\u4ef6\u7684\u683c\u5f0f\u5316\u529f\u80fd<\/h3>\n<\/p>\n<p><p>\u51e0\u4e4e\u6240\u6709\u7684\u6587\u672c\u7f16\u8f91\u8f6f\u4ef6\u548c\u6587\u5b57\u5904\u7406\u8f6f\u4ef6\u90fd\u63d0\u4f9b\u4e86\u6587\u672c\u683c\u5f0f\u5316\u7684\u529f\u80fd\uff0c\u5305\u62ec\u5927\u5c0f\u5199\u7684\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><h4>1. Microsoft Word\u7684\u5927\u5c0f\u5199\u8f6c\u6362<\/h4>\n<\/p>\n<p><p>\u5728Microsoft Word\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7<code>\u683c\u5f0f<\/code>\u83dc\u5355\u4e2d\u7684<code>\u5b57\u6bcd\u5927\u5c0f\u5199<\/code>\u9009\u9879\u6765\u8f6c\u6362\u9009\u4e2d\u6587\u672c\u7684\u5927\u5c0f\u5199\u3002\u8fd9\u4e2a\u529f\u80fd\u63d0\u4f9b\u4e86\u591a\u79cd\u8f6c\u6362\u9009\u9879\uff0c\u5305\u62ec\u5168\u90e8\u8f6c\u6362\u4e3a\u5927\u5199\u3002<\/p>\n<\/p>\n<p><h4>2. \u5176\u4ed6\u6587\u672c\u7f16\u8f91\u5668<\/h4>\n<\/p>\n<p><p>\u7c7b\u4f3c\u5730\uff0c\u5728\u5176\u4ed6\u6587\u672c\u7f16\u8f91\u5668\u4e2d\uff0c\u5982Notepad++\u3001Sublime Text\u7b49\uff0c\u4e5f\u901a\u5e38\u63d0\u4f9b\u6709\u6587\u672c\u5927\u5c0f\u5199\u8f6c\u6362\u7684\u529f\u80fd\uff0c\u65b9\u6cd5\u4f1a\u6709\u6240\u4e0d\u540c\u4f46\u603b\u4f53\u539f\u7406\u76f8\u4f3c\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u624b\u52a8\u66ff\u6362<\/h3>\n<\/p>\n<p><p>\u867d\u7136\u4e0d\u662f\u6700\u9ad8\u6548\u7684\u65b9\u6cd5\uff0c\u4f46\u5728\u67d0\u4e9b\u7b80\u5355\u6216\u5c0f\u89c4\u6a21\u7684\u6587\u672c\u5904\u7406\u573a\u666f\u4e2d\uff0c\u624b\u52a8\u66ff\u6362\u5c0f\u5199\u5b57\u6bcd\u4e3a\u5927\u5199\u4e5f\u662f\u53ef\u884c\u7684\u3002\u5c24\u5176\u5f53\u4f60\u53ea\u9700\u8981\u66f4\u6539\u51e0\u4e2a\u5b57\u6bcd\u6216\u5355\u8bcd\u65f6\uff0c\u76f4\u63a5\u624b\u52a8\u4fee\u6539\u53ef\u80fd\u4f1a\u66f4\u5feb\u3002<\/p>\n<\/p>\n<p><h4>1. \u624b\u52a8\u66ff\u6362\u7684\u65b9\u5f0f<\/h4>\n<\/p>\n<p><p>\u624b\u52a8\u66ff\u6362\u901a\u5e38\u9700\u8981\u4f60\u4e00\u4e2a\u4e00\u4e2a\u5b57\u6bcd\u5730\u68c0\u67e5\u5e76\u4fee\u6539\uff0c\u8fd9\u5728\u957f\u6587\u672c\u4e2d\u53ef\u80fd\u4f1a\u975e\u5e38\u8017\u65f6\u4e14\u6613\u4e8e\u51fa\u9519\u3002<\/p>\n<\/p>\n<p><h4>2. \u9002\u7528\u573a\u666f<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u7b80\u5355\u7684\u6587\u672c\u7f16\u8f91\u4efb\u52a1\uff0c\u5982\u4fee\u6539\u4e00\u4e2a\u77ed\u53e5\u6216\u4e00\u4e2a\u6807\u9898\uff0c\u624b\u52a8\u66ff\u6362\u662f\u4e00\u4e2a\u5feb\u901f\u76f4\u63a5\u7684\u65b9\u6cd5\u3002\u7136\u800c\uff0c\u5bf9\u4e8e\u5927\u91cf\u7684\u6587\u672c\u5904\u7406\uff0c\u624b\u52a8\u66ff\u6362\u7684\u6548\u7387\u4f4e\u4e14\u4e0d\u53ef\u53d6\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u51e0\u79cd\u65b9\u6cd5\uff0c\u4ece\u7f16\u7a0b\u81ea\u52a8\u5316\u5230\u624b\u52a8\u66ff\u6362\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u548c\u573a\u666f\u9009\u62e9\u6700\u5408\u9002\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u5230\u5927\u5199\u7684\u8f6c\u6362\u3002\u65e0\u8bba\u662f\u5728\u5f00\u53d1\u4e2d\u81ea\u52a8\u5904\u7406\u6587\u672c\uff0c\u8fd8\u662f\u5728\u65e5\u5e38\u7f16\u8f91\u4efb\u52a1\u4e2d\u683c\u5f0f\u5316\u6587\u672c\uff0c\u638c\u63e1\u8fd9\u4e9b\u6280\u5de7\u90fd\u4f1a\u4f7f\u4f60\u7684\u5de5\u4f5c\u66f4\u52a0\u9ad8\u6548\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u5927\u5199\u82f1\u6587\u5b57\u6bcd\u548c\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u6709\u4ec0\u4e48\u4e0d\u540c\uff1f<\/strong><br \/>\n\u5927\u5199\u548c\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u662f\u7531\u76f8\u540c\u7684\u5b57\u6bcd\u8868\u7ec4\u6210\uff0c\u533a\u522b\u5728\u4e8e\u5b83\u4eec\u7684\u5927\u5c0f\u548c\u5f62\u72b6\u3002\u5927\u5199\u5b57\u6bcd\u901a\u5e38\u7528\u4e8e\u8868\u793a\u53e5\u5b50\u7684\u5f00\u5934\u3001\u4e13\u6709\u540d\u8bcd\u548c\u6807\u9898\u7b49\uff0c\u800c\u5c0f\u5199\u5b57\u6bcd\u5219\u662f\u5728\u53e5\u5b50\u4e2d\u4f7f\u7528\u8f83\u591a\u7684\u5f62\u5f0f\u3002<\/p>\n<p><strong>2. \u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5c06\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\u5b57\u6bcd\u5417\uff1f<\/strong><br \/>\n\u662f\u7684\uff0c\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5c06\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\u5b57\u6bcd\u3002\u9996\u5148\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u73b0\u6709\u7684\u7f16\u7a0b\u8bed\u8a00\u4e2d\u7684\u5185\u7f6e\u51fd\u6570\u6216\u65b9\u6cd5\u6765\u5b9e\u73b0\u8fd9\u4e2a\u8f6c\u6362\u3002\u5176\u6b21\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528ASCII\u7801\u8868\u4e2d\u5927\u5199\u5b57\u6bcd\u548c\u5c0f\u5199\u5b57\u6bcd\u4e4b\u95f4\u7684\u6570\u503c\u5dee\u6765\u8fdb\u884c\u8f6c\u6362\u3002\u6700\u540e\uff0c\u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7\u5faa\u73af\u904d\u5386\u6bcf\u4e2a\u5b57\u7b26\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u5927\u5199\u5f62\u5f0f\u6765\u5b9e\u73b0\u8f6c\u6362\u3002<\/p>\n<p><strong>3. \u6709\u6ca1\u6709\u5176\u4ed6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\u5728\u5c06\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\u5b57\u6bcd\u65f6\uff1f<\/strong><br \/>\n\u5f53\u5c06\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\u5b57\u6bcd\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\u3002\u9996\u5148\uff0c\u4e0d\u540c\u7684\u7f16\u7a0b\u8bed\u8a00\u53ef\u80fd\u4f7f\u7528\u4e0d\u540c\u7684\u51fd\u6570\u6216\u65b9\u6cd5\u6765\u5b9e\u73b0\u8f6c\u6362\uff0c\u56e0\u6b64\u9700\u8981\u4e86\u89e3\u6240\u4f7f\u7528\u8bed\u8a00\u7684\u6587\u6863\u548c\u89c4\u8303\u3002\u5176\u6b21\uff0c\u7279\u6b8a\u5b57\u7b26\u548c\u7b26\u53f7\u901a\u5e38\u6ca1\u6709\u5927\u5199\u5f62\u5f0f\uff0c\u56e0\u6b64\u5728\u8f6c\u6362\u8fc7\u7a0b\u4e2d\u9700\u8981\u8fdb\u884c\u68c0\u67e5\u5e76\u4fdd\u7559\u5b83\u4eec\u7684\u539f\u6837\u3002\u6700\u540e\uff0c\u8bb0\u4f4f\u5728\u8f6c\u6362\u540e\uff0c\u5b57\u6bcd\u7684\u5f62\u72b6\u3001\u5927\u5c0f\u548c\u4f4d\u7f6e\u53ef\u80fd\u4f1a\u53d1\u751f\u53d8\u5316\uff0c\u56e0\u6b64\u9700\u8981\u786e\u4fdd\u8f6c\u6362\u540e\u7684\u7ed3\u679c\u7b26\u5408\u9884\u671f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5c06\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u8f6c\u6362\u6210\u5927\u5199\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u7f16\u7a0b\u8bed\u8a00\u4e2d\u7684\u5185\u7f6e\u51fd\u6570\u3001\u5728\u7ebf\u8f6c\u6362\u5de5\u5177\u3001\u6587\u672c\u7f16\u8f91\u8f6f\u4ef6\u7684\u683c\u5f0f\u5316\u5de5\u5177\u3001\u4ee5\u53ca\u624b\u52a8 [&hellip;]","protected":false},"author":3,"featured_media":298025,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/298008"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=298008"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/298008\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/298025"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=298008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=298008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=298008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}