簡體   English   中英

在字符串右側添加空格

[英]Adding white space to the right of a string

如何在字符串的右側添加一個空格str+= '+'; ? 我試過str+= '+'+' '; 但它似乎不起作用。

例如,您應該嘗試:

str = str + ' ';

更簡潔:

str += ' ';

strring strwithspace = str.PadRight(1);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM