library/src/blockclass/subclasses/BP_StringUtils.cc
// matches a regular expression (simple bool; uses local this->string)
matches a regular expression (simple bool; uses local this->string)
matches a regular expression ( simple bool ; uses local this - > string )
bool BP_StringUtils::RegMatch(char *match_regexp)
{
	char * test_string = NULL;
	if(this->string)
		test_string = this->string;
	if(this->build_str)
		test_string = this->build_str;
	if(!test_string)
		return false;
	if(!this->string || !bpstrlen(this->string))
	if(!this->build_str || !bpstrlen(this->build_str))
	if(!match_regexp)
		return false;
	BP_REGEX_MATCH_INFO match_info = {0};
	if(BP_MatchRegularExpression(this->string, bpstrlen(this->string), match_regexp, 0, 1, (P_BP_REGEX_MATCH_INFO) NULL) == ERR_SUCCESS)
		return true;
	return false;
}
bool BP_StringUtils :: RegMatch ( char * match_regexp ) { char * test_string = NULL ; if ( this -> string ) test_string = this -> string ; if ( this -> build_str ) test_string = this -> build_str ; if ( ! test_string ) return false ; if ( ! this -> string || ! bpstrlen ( this -> string ) ) if ( ! this -> build_str || ! bpstrlen ( this -> build_str ) ) if ( ! match_regexp ) return false ; BP_REGEX_MATCH_INFO match_info = { 0 } ; if ( BP_MatchRegularExpression ( this -> string , bpstrlen ( this -> string ) , match_regexp , 0 , 1 , ( P_BP_REGEX_MATCH_INFO ) NULL ) == ERR_SUCCESS ) return true ; return false ; }
matches a regular expression (simple bool; uses local this->string)
matches a regular expression ( simple bool ; uses local this - > string )
// string to test // select string // ensure we have a string before continuing // return false if string is empty // create match info structure // return true if the regular expression matches // return indicating failure (nomatch)