/* Returns: The position in tvb of the first non-whitespace character following offset or offset + maxlength -1 whichever is smaller.  */
gint tvb_skip_wsp(tvbuff_t *tvb, const gint offset, const gint maxlength)
/* Returns: The position in tvb of the first non-whitespace character following offset or offset + maxlength -1 whichever is smaller.  */
gint tvb_skip_wsp(tvbuff_t *tvb, const gint offset, const gint maxlength)
{
	gint   counter = offset;
	gint   end, tvb_len;
	guint8 tempchar;
	DISSECTOR_ASSERT(tvb && tvb->initialized);
	tvb_len = tvb->length;
	end     = offset + maxlength;
	if (end >= tvb_len)
	{
		end = tvb_len;
	}
	for (counter = offset;
		 counter < end &&
		  ((tempchar = tvb_get_guint8(tvb,counter)) == ' ' ||
		  tempchar == '\t' || tempchar == '\r' || tempchar == '\n');
		 counter++);
	return (counter);
}