public static function lineComment ($strComment, $intTabs = 0)
	{
		
		// Set return
		
		$strReturn	= '';
		
		// Split comment into lines
		
		$arrComment	= explode ("\n", $strComment);
		
		// Find the position of the first /
		
		$intFirstSlash	= strpos ($arrComment[0], '/');
		
		// Set prefix
		
		$strPrefix		= ($intFirstSlash)? substr ($arrComment[0], 0, $intFirstSlash) : NULL;
		
		// Clean comment
		
		$strComment	= self::cleanComment ($strComment);
		
		// Split comment into lines
		
		$arrComment	= explode ("\n", $strComment);
		
		// Set tabs
		
		$strTabs	= str_repeat ("\t", $intTabs);
		
		// For each line
		
		foreach ($arrComment as $strLine)
		{
			
			// Add line
			
			$strReturn	.= $strTabs . $strPrefix . '// ' . $strLine . "\n";
			
		}
		
		// Remove last \n
		
		if (substr ($strReturn, -1) == "\n")
		{
			
			$strReturn	= substr ($strReturn, 0, -1);
			
		}
		
		// Return
		
		return $strReturn;
		
	}
public static function lineComment ($strComment, $intTabs = 0)
	{
		
		// Set return
		
		$strReturn	= '';
		
		// Split comment into lines
		
		$arrComment	= explode ("\n", $strComment);
		
		// Find the position of the first /
		
		$intFirstSlash	= strpos ($arrComment[0], '/');
		
		// Set prefix
		
		$strPrefix		= ($intFirstSlash)? substr ($arrComment[0], 0, $intFirstSlash) : NULL;
		
		// Clean comment
		
		$strComment	= self::cleanComment ($strComment);
		
		// Split comment into lines
		
		$arrComment	= explode ("\n", $strComment);
		
		// Set tabs
		
		$strTabs	= str_repeat ("\t", $intTabs);
		
		// For each line
		
		foreach ($arrComment as $strLine)
		{
			
			// Add line
			
			$strReturn	.= $strTabs . $strPrefix . '// ' . $strLine . "\n";
			
		}
		
		// Remove last \n
		
		if (substr ($strReturn, -1) == "\n")
		{
			
			$strReturn	= substr ($strReturn, 0, -1);
			
		}
		
		// Return
		
		return $strReturn;
		
	}
public static function lineComment ( $ strComment , $ intTabs = 0 ) { // Set return $ strReturn = '' ; // Split comment into lines $ arrComment = explode ( "\n" , $ strComment ) ; // Find the position of the first / $ intFirstSlash = strpos ( $ arrComment [ 0 ] , '/' ) ; // Set prefix $ strPrefix = ( $ intFirstSlash ) ? substr ( $ arrComment [ 0 ] , 0 , $ intFirstSlash ) : NULL ; // Clean comment $ strComment = self :: cleanComment ( $ strComment ) ; // Split comment into lines $ arrComment = explode ( "\n" , $ strComment ) ; // Set tabs $ strTabs = str_repeat ( "\t" , $ intTabs ) ; // For each line foreach ( $ arrComment as $ strLine ) { // Add line $ strReturn .= $ strTabs . $ strPrefix . '// ' . $ strLine . "\n" ; } // Remove last \n if ( substr ( $ strReturn , - 1 ) == "\n" ) { $ strReturn = substr ( $ strReturn , 0 , - 1 ) ; } // Return return $ strReturn ; }
Return a lined comment
@param type $strComment Comment
@param type $intTabs Tabs before line
@return string
Return a lined comment