library/src/utility/BP-StringUtilities.cc
// attept to print bits in a series of bytes (space delimited)
attept to print bits in a series of bytes (space delimited)
attept to print bits in a series of bytes ( space delimited )
BP_ERROR_T BP_PrintBitsInBytes(unsigned char *in_bytes, size_t byte_count)
{
	if(!in_bytes)
		return ERR_FAILURE;
	if(!byte_count)
		return ERR_FAILURE;
	size_t n = 0;
	for(; n < byte_count; n++)
	{
		BP_PrintBitsInByte(in_bytes[n]);
		if((n+1) != byte_count)
			printf(" ");
	}
	return ERR_SUCCESS;
}
BP_ERROR_T BP_PrintBitsInBytes ( unsigned char * in_bytes , size_t byte_count ) { if ( ! in_bytes ) return ERR_FAILURE ; if ( ! byte_count ) return ERR_FAILURE ; size_t n = 0 ; for ( ; n < byte_count ; n ++ ) { BP_PrintBitsInByte ( in_bytes [ n ] ) ; if ( ( n + 1 ) != byte_count ) printf ( " " ) ; } return ERR_SUCCESS ; }
attept to print bits in a series of bytes (space delimited)
attept to print bits in a series of bytes ( space delimited )
// ensure we have a pointer and a count // iterate through bytes and print // print the bits // add space if necessary // return indicating success