Rev | Line | |
---|
[6779] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * FCKeditor - The text editor for Internet - http://www.fckeditor.net |
---|
| 4 | * Copyright (C) 2003-2007 Frederico Caldeira Knabben |
---|
| 5 | * |
---|
| 6 | * == BEGIN LICENSE == |
---|
| 7 | * |
---|
| 8 | * Licensed under the terms of any of the following licenses at your |
---|
| 9 | * choice: |
---|
| 10 | * |
---|
| 11 | * - GNU General Public License Version 2 or later (the "GPL") |
---|
| 12 | * http://www.gnu.org/licenses/gpl.html |
---|
| 13 | * |
---|
| 14 | * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
---|
| 15 | * http://www.gnu.org/licenses/lgpl.html |
---|
| 16 | * |
---|
| 17 | * - Mozilla Public License Version 1.1 or later (the "MPL") |
---|
| 18 | * http://www.mozilla.org/MPL/MPL-1.1.html |
---|
| 19 | * |
---|
| 20 | * == END LICENSE == |
---|
| 21 | * |
---|
| 22 | * Utility functions for the File Manager Connector for PHP. |
---|
| 23 | */ |
---|
| 24 | |
---|
| 25 | function RemoveFromStart( $sourceString, $charToRemove ) |
---|
| 26 | { |
---|
| 27 | $sPattern = '|^' . $charToRemove . '+|' ; |
---|
| 28 | return preg_replace( $sPattern, '', $sourceString ) ; |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | function RemoveFromEnd( $sourceString, $charToRemove ) |
---|
| 32 | { |
---|
| 33 | $sPattern = '|' . $charToRemove . '+$|' ; |
---|
| 34 | return preg_replace( $sPattern, '', $sourceString ) ; |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | function ConvertToXmlAttribute( $value ) |
---|
| 38 | { |
---|
| 39 | return utf8_encode( htmlspecialchars( $value ) ) ; |
---|
| 40 | } |
---|
| 41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.