09 2011 档案

摘要:String.Format("{0,-10}",str);//这个表示第一个参数str字符串的宽度为10,左对齐String.Format("{0,10}",str);//这个表示第一个参数str字符串的宽度为10,右对齐参考:From MSDNFormat Item SyntaxEach format item takes the following form and consists of the following components:{index[,alignment][:formatString]}The matching braces (& 阅读全文
posted @ 2011-09-02 23:01 OYJJ 阅读(18697) 评论(0) 推荐(1)
摘要:class Program { static void Main(string[] args) { Console.WriteLine("****************************************************************\n"); Console.WriteLine("Http Response Header Resolver V1.00.00\n"); Console.WriteLine("input a url for example:w... 阅读全文
posted @ 2011-09-02 22:54 OYJJ 阅读(5101) 评论(0) 推荐(0)
摘要:int arr[100]; printf("&arr[0]=%d\n",&arr[0]); printf("arr=%d\n",arr); printf("&arr=%d\n",&arr); printf("&arr[0]+1=%d\n",&arr[0]+1); printf("arr+1=%d\n",arr+1); printf("&arr+1=%d\n",&arr+1);运行的结果&arr[0]=12 阅读全文
posted @ 2011-09-01 22:53 OYJJ 阅读(236) 评论(0) 推荐(0)
摘要:sscanf char buf[]="port=5000"; char key[100]=""; char value[100]=""; sscanf(buf,"%[^=]=%[^\n]",key,value); printf("key=%s\n",key); printf("value=%s\n",value); strtok char buf[]="port=5000"; char key[100]=""; char value[1 阅读全文
posted @ 2011-09-01 22:45 OYJJ 阅读(1891) 评论(0) 推荐(1)