Proper way to empty a C-String

前端 未结 6 1881
孤城傲影
孤城傲影 2020-12-04 15:12

I\'ve been working on a project in C that requires me to mess around with strings a lot. Normally, I do program in C++, so this is a bit different than just saying string.e

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-04 15:57

    needs name of string and its length will zero all characters other methods might stop at the first zero they encounter

        void strClear(char p[],u8 len){u8 i=0; 
            if(len){while(i

提交回复
热议问题