function length = textlen(string,units)
if(nargin<2)
	units = 'points';
end
h = text('String',string,...
			'Position',[0 0],...
			'Visible','off',...
			'Units',units,...
			'FontName','Geneva',...
			'FontSize',10);
length = get(h,'Extent');
length = length(3)+1;
delete(h);
