Subversion Repositories Applications.papyrus

Rev

Rev 1371 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?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 ) ) ;
}
?>