util.asp
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:1k
源码类别:

OA系统

开发平台:

C#

  1. <!--
  2.  * FCKeditor - The text editor for internet
  3.  * Copyright (C) 2003-2006 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. RemoveFromStart = oRegex.Replace( sourceString, "" )
  25. End Function
  26. Function RemoveFromEnd( sourceString, charToRemove )
  27. Dim oRegex
  28. Set oRegex = New RegExp
  29. oRegex.Pattern = charToRemove & "+$"
  30. RemoveFromEnd = oRegex.Replace( sourceString, "" )
  31. End Function
  32. Function ConvertToXmlAttribute( value )
  33. ConvertToXmlAttribute = Replace( value, "&", "&amp;" )
  34. End Function
  35. Function InArray( value, sourceArray )
  36. Dim i
  37. For i = 0 to UBound( sourceArray )
  38. If sourceArray(i) = value Then
  39. InArray = True
  40. Exit Function
  41. End If
  42. Next
  43. InArray = False
  44. End Function
  45. %>