| Commit | Line | Data |
|---|---|---|
| 2c41f413 JT |
1 | <?php \r/* |
| 2 | * FCKeditor - The text editor for internet\r | |
| 3 | * Copyright (C) 2003-2004 Frederico Caldeira Knabben\r | |
| 4 | * \r | |
| 5 | * Licensed under the terms of the GNU Lesser General Public License:\r | |
| 6 | * http://www.opensource.org/licenses/lgpl-license.php\r | |
| 7 | * \r | |
| 8 | * For further information visit:\r | |
| 9 | * http://www.fckeditor.net/\r | |
| 10 | * \r | |
| 11 | * File Name: util.php\r | |
| 12 | * This is the File Manager Connector for ASP.\r | |
| 13 | * \r | |
| 14 | * Version: 2.0 RC2\r | |
| 15 | * Modified: 2004-12-10 17:46:39\r | |
| 16 | * \r | |
| 17 | * File Authors:\r | |
| 18 | * Frederico Caldeira Knabben (fredck@fckeditor.net) | |
| 19 | */ | |
| 20 | \r | |
| 21 | function RemoveFromStart( $sourceString, $charToRemove )\r | |
| 22 | {\r | |
| 23 | $sPattern = '|^' . $charToRemove . '+|' ;\r | |
| 24 | return preg_replace( $sPattern, '', $sourceString ) ;\r | |
| 25 | }\r | |
| 26 | \r | |
| 27 | function RemoveFromEnd( $sourceString, $charToRemove )\r | |
| 28 | {\r | |
| 29 | $sPattern = '|' . $charToRemove . '+$|' ;\r | |
| 30 | return preg_replace( $sPattern, '', $sourceString ) ;\r | |
| 31 | }\r | |
| 32 | \r | |
| 33 | function ConvertToXmlAttribute( $value )\r | |
| 34 | {\r | |
| 35 | return utf8_encode( htmlspecialchars( $value ) ) ;\r | |
| 36 | }\r | |
| 37 | ?> |