bool SubString( char Subll, char S, int pos, int len ∥若参数合法即1 possstrLength(S)且 0≤en≤S1 OS+1 0s个字符起长度为em的子审,并返回TRUE,否则返 回 FALSE slen=StrEngth (s); ∥求串S的长度 if(pos<1‖!pos>slen‖len<0‖len>slen- pos+1) return FAlse: for(j=0; j< len; j++) Sub[j]= s[ pos +j-1I ∥向子串Sub复制字符 Sub[len]=t0 ∥置串Sub的结束标志 return TRUE• bool SubString ( char Sub[ ], char S, int pos, int len ) { // 若参数合法(即1≤pos≤StrLength(S) 且 0≤len≤StrLength(S)-pos+1),则以Sub带回串S中第 pos个字符起长度为len的子串,并返回TRUE,否则返 回FALSE slen=StrLength(S); // 求串S的长度 if (pos < 1 || pos > slen || len < 0 || len > slenpos+1) return FALSE; for ( j = 0; j < len; j++ ) Sub[ j ] = S[ pos + j - 1 ]; // 向子串Sub复制字符 Sub[len] = '\0'; // 置串Sub的结束标志 return TRUE; }