📄 test_string.c
字号:
#include <stdio.h>#include "csapp.h"int main(int argc, char *argv[]) { //char buf[1024]; //buf[0] = 'a'; //buf[1] = 'b'; //buf[2] = ' '; //buf[3] = 'c'; //buf[4] = '\0'; //buf = "abc d"; //printf("buf: %s\n",buf); /* int fd , n; rio_t rio; fd = Open("proxy.filter",O_RDONLY,0); Rio_readinitb(&rio,fd); while ( 1 ) { char buf[1024]; if ( ( n = Rio_readlineb(&rio, buf,1024) ) > 0) { printf("line : %s \n",buf); } else break; }*/ /*char *old = "abcdefg"; char *new = "abcdegd"; char *old1 = old ; char *new1 = new ; int i = 0; while ( *old1 ++ == *new1 ++ ) { //old1++; //new1++; i++; printf("i : %d \n",i); printf("old : %p old* : %c\n",old1,*old1); printf("new : %p new* : %c\n",new1,*new1); }*/ char *test = "abcdef g "; char *test1 = "abc\rd"; int i = strlen(test); printf("test : %s \n len : %d \n test1 : %s\n char : a%cd\n",test,i,test1,32); //test[i]= ' '; //test[i-1]=' '; //test[i-2] = '\0'; //test = Trim(test); printf("test : %s \n len : %d \n n : %c\n",test,strlen(test),10); exit(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -