1. 程式人生 > >string.Format("{0,-50}", "qqqqqqqqqqqq")

string.Format("{0,-50}", "qqqqqqqqqqqq")

logs pre 花括號 str nbsp class 長度 mat string

            //sss={"100"}。有兩個花括號
            string sss = string.Format("{{\"100\"}}", 100);

            //string.Format("{0,向(正為右,負為左)對齊的字符串長度}","展示的字符串"); 
            string s = string.Format("{0,-50}", "qqqqqqqqqqqq")+string.Format("{0,-30}", "wwwwwwwwwwwww");
            string ss = string.Format("{0,-50}", "
qqq") +string.Format("{0,-30}", "wwwwwwwwwwwww");

string.Format("{0,-50}", "qqqqqqqqqqqq")