library/src/utility/BP-StringUtilities.cc
// Creates a column structure from a character ** array
Creates a column structure from a character ** array
Creates a column structure from a character ** array
P_BP_SFS_STRING_COLUMN BP_CreateStringColumnFromStringArrayTQ(char ** string_array, size_t entries, P_BP_COLOR_CODE_SET_T color_info, P_BP_LINKL tq)
{
	if(!string_array || !entries || !tq)
		return NULL;
	return NULL;
}
P_BP_SFS_STRING_COLUMN BP_CreateStringColumnFromStringArrayTQ ( char * * string_array , size_t entries , P_BP_COLOR_CODE_SET_T color_info , P_BP_LINKL tq ) { if ( ! string_array || ! entries || ! tq ) return NULL ; return NULL ; }
Creates a column structure from a character ** array
Creates a column structure from a character ** array
// ensure we have string array and count /*

	// allocate collumn structure
	P_BP_STRING_COLUMN column = (P_BP_STRING_COLUMN) tq_calloc(tq, sizeof(BP_STRING_COLUMN), 1, BPLN);
	if(!column)
		return NULL;

	// allocate space for entries
	column->col_data = (char **) tq_calloc(tq, sizeof(char *) * (entries + 1), 1, BPLN);
	if(!column->col_data)
	{
		tq_free(tq, column);
		return NULL;
	}

	// allocate space for widths
	column->widths = (size_t *) tq_calloc(tq, sizeof(size_t ) * (entries+1), 1, BPLN);
	if(!column->widths)
	{
		tq_free(tq, column->col_data);
		tq_free(tq, column);
		return NULL;
	}

	// longest entry checking
	size_t longest_entry_len = 0;
	size_t current_entry_len = 0;

	// iterate through entries and duplicate each
	size_t n = 0;
	for(; n < entries; n++)
	{

		// ensure we have an array placement
		if(!string_array[n])
			continue;

		// calculate current entry length
		current_entry_len = bpstrlen(string_array[n]);

		// check entry lengths
		if(current_entry_len > longest_entry_len)
			longest_entry_len = current_entry_len;


		// store entry width
		column->widths[n]   = current_entry_len;

		// try to duplicate the column
		column->col_data[n] = tq_strdup(tq, string_array[n], BPLN);



		// ensure we could create the string ok, if not, destroy allocated
		// memory and exit.
		if(!column->col_data[n])
		{

			BP_DestroyPointerArrayTAILQ(tq, (void **) column->col_data, n);
			tq_free(tq, column->widths);
			tq_free(tq, column);
			return NULL;

		}

	}

	// set entries to the real number of entries created
	column->entries = n;

	// set column width from widest column
	column->widest_column = longest_entry_len;


	// set color info if necessary
	if(color_info)
	{
		memcpy(&column->color_info, color_info, sizeof(BP_COLOR_CODE_SET_T));
	}

		return column;
	*/ // return column