Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 1687 → Rev 1688

/branches/livraison_aha/api/fckeditor/editor/filemanager/browser/default/connectors/php/util.php
New file
0,0 → 1,37
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: util.php
* This is the File Manager Connector for ASP.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
 
function RemoveFromStart( $sourceString, $charToRemove )
{
$sPattern = '|^' . $charToRemove . '+|' ;
return preg_replace( $sPattern, '', $sourceString ) ;
}
 
function RemoveFromEnd( $sourceString, $charToRemove )
{
$sPattern = '|' . $charToRemove . '+$|' ;
return preg_replace( $sPattern, '', $sourceString ) ;
}
 
function ConvertToXmlAttribute( $value )
{
return utf8_encode( htmlspecialchars( $value ) ) ;
}
?>