library/src/decoders/HTML/BP-HTMLDecoder.cc
// Gets a anchor var by value.
Gets a anchor var by value.
Gets a anchor var by value .
P_BP_HTML_ANCHOR_VAR_LIST HTMLGetAnchorVarByValueI(P_BP_HTML_ANCHOR_VAR_LIST vars, char *value)
{
	if(!vars || !value)
		return NULL;
	size_t value_len = bpstrlen(value);
	if(!value_len)
		return NULL;
	size_t current_var_value_len = 0;
	for(vars = vars->first; vars; vars = vars->next)
	{
		if(!vars->content)
			continue;
		current_var_value_len = bpstrlen(vars->content);
		if(current_var_value_len != value_len)
			continue;
		if(BP_strncasecmp(value, vars->content, current_var_value_len) == 0)
			return vars;
	}
	return NULL;
}
P_BP_HTML_ANCHOR_VAR_LIST HTMLGetAnchorVarByValueI ( P_BP_HTML_ANCHOR_VAR_LIST vars , char * value ) { if ( ! vars || ! value ) return NULL ; size_t value_len = bpstrlen ( value ) ; if ( ! value_len ) return NULL ; size_t current_var_value_len = 0 ; for ( vars = vars -> first ; vars ; vars = vars -> next ) { if ( ! vars -> content ) continue ; current_var_value_len = bpstrlen ( vars -> content ) ; if ( current_var_value_len != value_len ) continue ; if ( BP_strncasecmp ( value , vars -> content , current_var_value_len ) == 0 ) return vars ; } return NULL ; }
Gets a anchor var by value.
Gets a anchor var by value .
// null checks // set ensure we nave a value length // set to the current variable names length // walk properties list, find value // we need a name // set name length // ensure lengths match // return the list if we have a match // if property was not found, return null