public function wordWrap($text, $width = 72, $break = "\n", $cut = false) {

		if ($cut) {
			$parts = array();
			while (mb_strlen($text) > 0) {
				$part = mb_substr($text, 0, $width);
				$parts[] = trim($part);
				$text = trim(mb_substr($text, mb_strlen($part)));
			}

			return implode($break, $parts);
		}

		$parts = array();
		while (mb_strlen($text) > 0) {
			if ($width >= mb_strlen($text)) {
				$parts[] = trim($text);
				break;
			}

			$part = mb_substr($text, 0, $width);
			$nextChar = mb_substr($text, $width, 1);
			if ($nextChar !== ' ') {
				$breakAt = mb_strrpos($part, ' ');
				if ($breakAt === false) {
					$breakAt = mb_strpos($text, ' ', $width);
				}
				if ($breakAt === false) {
					$parts[] = trim($text);
					break;
				}
				$part = mb_substr($text, 0, $breakAt);
			}

			$part = trim($part);
			$parts[] = $part;
			$text = trim(mb_substr($text, mb_strlen($part)));
		}

		return implode($break, $parts);

	}