<?php
/**
 * @package vsc_infrastructure
 * @author marius orcsik <marius@habarnam.ro>
 * @date 10.04.16
 */
class vscString {

	static function stripTags ($sString) {
		return ereg_replace("<[a-z\/\":=]*>", '', $sString);
	}

	static function stripEntities ($sString) {
		return html_entity_decode($sString, ENT_NOQUOTES, 'UTF-8');
	}

	static function _echo ($sString, $iTimes = 1) {
		for ($i = 0; $i <= $iTimes; $i++)
			echo $sString;
	}

	/**
	 * returns an end of line, based on the environment
	 * @return string
	 */
	static public function nl () {
		return isCli() ? "\n" : '<br/>' . "\n";
	}

	/**
	 * Removes all extra spaces from a string
	 * @param string $s
	 * @return string
	 */
	static public function allTrim ($sString) {
		return trim (ereg_replace('/\s+/', ' ', $sString));
	}

	static public function formatUri ($sString) {
		$aToReplace		= array (
			'/(&([^(amp;)]+=))/'
		);
		$aReplaceWith	= array (
			'&amp;\2'
		);
		return preg_replace($aToReplace, $aReplaceWith, $sString);
	}
}
<?php
/**
 * @package vsc_infrastructure
 * @author marius orcsik <marius@habarnam.ro>
 * @date 10.04.16
 */
class vscString {

	static function stripTags ($sString) {
		return ereg_replace("<[a-z\/\":=]*>", '', $sString);
	}

	static function stripEntities ($sString) {
		return html_entity_decode($sString, ENT_NOQUOTES, 'UTF-8');
	}

	static function _echo ($sString, $iTimes = 1) {
		for ($i = 0; $i <= $iTimes; $i++)
			echo $sString;
	}

	/**
	 * returns an end of line, based on the environment
	 * @return string
	 */
	static public function nl () {
		return isCli() ? "\n" : '<br/>' . "\n";
	}

	/**
	 * Removes all extra spaces from a string
	 * @param string $s
	 * @return string
	 */
	static public function allTrim ($sString) {
		return trim (ereg_replace('/\s+/', ' ', $sString));
	}
}
Revert "* adding a method for cleaning the uris"
Revert "* adding a method for cleaning the uris"

This reverts commit 8841631a74b0e67c54e86466b16772f2898740ec.
