~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/editor/filemanager/browser/default/connectors/asp/util.asp

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
Import upstream version 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
 * FCKeditor - The text editor for internet
 
3
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 
4
 * 
 
5
 * Licensed under the terms of the GNU Lesser General Public License:
 
6
 *              http://www.opensource.org/licenses/lgpl-license.php
 
7
 * 
 
8
 * For further information visit:
 
9
 *              http://www.fckeditor.net/
 
10
 * 
 
11
 * "Support Open Source software. What about a donation today?"
 
12
 * 
 
13
 * File Name: util.asp
 
14
 *      This file include generic functions used by the ASP Connector.
 
15
 * 
 
16
 * File Authors:
 
17
 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
 
18
-->
 
19
<%
 
20
Function RemoveFromStart( sourceString, charToRemove )
 
21
        Dim oRegex
 
22
        Set oRegex = New RegExp
 
23
        oRegex.Pattern = "^" & charToRemove & "+"
 
24
 
 
25
        RemoveFromStart = oRegex.Replace( sourceString, "" )
 
26
End Function
 
27
 
 
28
Function RemoveFromEnd( sourceString, charToRemove )
 
29
        Dim oRegex
 
30
        Set oRegex = New RegExp
 
31
        oRegex.Pattern = charToRemove & "+$"
 
32
 
 
33
        RemoveFromEnd = oRegex.Replace( sourceString, "" )
 
34
End Function
 
35
 
 
36
Function ConvertToXmlAttribute( value )
 
37
        ConvertToXmlAttribute = Replace( value, "&", "&amp;" )
 
38
End Function
 
39
 
 
40
Function InArray( value, sourceArray )
 
41
        Dim i
 
42
        For i = 0 to UBound( sourceArray )
 
43
                If sourceArray(i) = value Then
 
44
                        InArray = True
 
45
                        Exit Function
 
46
                End If
 
47
        Next
 
48
        InArray = False
 
49
End Function
 
50
 
 
51
%>
 
 
b'\\ No newline at end of file'