private int wrap(String string, int from) {
		int pos = -1;
		
		if ((pos = string.indexOf('\n', from)) != -1 && pos <= Terminal.width) {
			return pos + 1;
		}
		
		if (string.length() <= Terminal.width) {
			return -1;
		}
		
		pos = Terminal.width;
		
		while (pos >= from) {
			if (string.charAt(pos) == ' ' || string.charAt(pos) == '\t') {
				return pos;
			}
			
			pos--;
		}
		
		pos = Terminal.width + 1;
		
		while (pos <= string.length()) {
			if (string.charAt(pos) == ' ' || string.charAt(pos) == '\t') {
				return pos;
			}
			
			pos++;
		}
		
		return -1;
	}