library/src/utility/BP-StringUtilities.cc
// Same as above but requires a reasonable string as input.
Same as above but requires a reasonable string as input.
Same as above but requires a reasonable string as input .
int BP_LookupFirstCharacterOffsetInReasonableString
(
	char * reasonable_string,
	char   lookup_char,
	BP_STRING_OFFSET_LOOKUP_DIRECTION lookup_direction
)
{
	if(!reasonable_string)
		return -1;
	if(!BP_StringIsReasonablePrintableString(reasonable_string, bpstrlen(reasonable_string), BP_FALSE, BP_FALSE))
		return -1;
	size_t len = bpstrlen(reasonable_string);
	return BP_LookupFirstCharacterOffsetInBuffer
	(
		reasonable_string,
		len,
		lookup_char,
		lookup_direction
	);
}
int BP_LookupFirstCharacterOffsetInReasonableString ( char * reasonable_string , char lookup_char , BP_STRING_OFFSET_LOOKUP_DIRECTION lookup_direction ) { if ( ! reasonable_string ) return -1 ; if ( ! BP_StringIsReasonablePrintableString ( reasonable_string , bpstrlen ( reasonable_string ) , BP_FALSE , BP_FALSE ) ) return -1 ; size_t len = bpstrlen ( reasonable_string ) ; return BP_LookupFirstCharacterOffsetInBuffer ( reasonable_string , len , lookup_char , lookup_direction ) ; }
Same as above but requires a reasonable string as input.
Same as above but requires a reasonable string as input .
// run reasonable checks // set len // attempt lookup