added function to truncate nulls from strings when found
used this function in the dbret$ and dberrors functions