11月 5th, 2006
文字列操作処理の手?
文字列操作処理の手本にしているコピーコマンドのソースです。
while内に条件? を付ければいろいろと? 用も可能です。
char *copy( char* chp_dst, /* (O) 変朏 後文字列 */ const char* chp_src /* (I) 変朏 前文字列 */ ){ int i=0; int j=0; while( (chp_dst[i] = chp_src[j]) != '\0' ){ i++; j++; } return chp_dst; }