utils/utils.cpp
//find the index which means all aligned sequences` substring [end,start] have at least length size(gap not include) 

find the index which means all aligned sequences` substring [end,start] have at least length size(gap not include)
find the index which means all aligned sequences ` substring [ end start ] have at least length size ( gap not include )
int Find_length_index_backward_all(vector<string> Aligned_Sequences, int start, int length) {
	int end = start - length + 1;
	if (end < 0) {
		return -1; 
	}
	bool exist_short = true;
	while (true) {
		for (int i = 0; i < Aligned_Sequences.size(); ++i) {
			string substring = Aligned_Sequences[i].substr(end, start - end + 1);
			string rp_substring = replace(substring, "-", "");
			if (rp_substring.size() < length) {
				end--;
				exist_short = true;
				break;
			}
			exist_short = false;
		}
		if (end < 0) {
			return -1; 
		}
		if (exist_short) {
			continue;
		}
		else {
			break;
		}
	}
	return end;
}
int Find_length_index_backward_all ( vector < string > Aligned_Sequences , int start , int length ) { int end = start - length + 1 ; if ( end < 0 ) { return -1 ; } bool exist_short = true ; while ( true ) { for ( int i = 0 ; i < Aligned_Sequences . size ( ) ; ++ i ) { string substring = Aligned_Sequences [ i ] . substr ( end , start - end + 1 ) ; string rp_substring = replace ( substring , " " , " " ) ; if ( rp_substring . size ( ) < length ) { end -- ; exist_short = true ; break ; } exist_short = false ; } if ( end < 0 ) { return -1 ; } if ( exist_short ) { continue ; } else { break ; } } return end ; }
find the index which means all aligned sequences` substring [end,start] have at least length size(gap not include)
find the index which means all aligned sequences ` substring [ end start ] have at least length size ( gap not include )
//start included, end included.
 //can not find the index.
 //exist at least one sequence, its length is shorter than requirement.
 //can not find the index.
