World Of Webmaster
Đăng nhập / Đăng ký
Account
Free for web
Check pagerank
Input check pager (Not http://)

Ext: blog.kai.vn
Check google pagerank
View HTML source
FUNCTION LIBRARY
HTML Tags Library
PHP Functions Library ASP Functions Library
ASP Functions RemChr
Chức năng: Xóa những ký tự không dùng đến trong chuổi
Ngôn ngữ: asp - Nhóm: string
CÚ PHÁP
string = RemChr(Input, Disallowed) 

Sử dụng để xóa những ký tự không dùng đến trong một chuổi.
Input: Chuổi cần làm sạch.
Disallowed: Các ký tự không được sử dụng.

VÍ DỤ
<%
Dim Input, Disallowed

 '--- String to clean
Input =    "sjsvnw)68&Y469$T_W$(*T+}D|3567808SDK49SO" & _
        "DJ0570570Gosdnp SNDFG_S(*GH-S570570GN*4 jwt jtj+W$T )"

 '--- Allow spaces, underscores and any integer or letter of the alphabet.
 '--- Remove anything else...
Disallowed = "[]+=)(*&^%$#@!|\/?><,{}:;.-~`'" & chr(34) & vbCrLf & vbTab
Response.Write RemChr(Input, Disallowed)

 '--- remove spaces, tabs, linefeed carriagereturns...
Disallowed = " " & vbTab & vbCrLf
Response.Write RemChr(Input, Disallowed)

 '--- remove numbers...
Disallowed = "0123456789"
Response.Write RmChr(Input, Disallowed)

 '--- remove lower case letters...
Disallowed = lcase("abcdefghijklmnopqrstuvwxyz")
Response.Write RemChr(Input, Disallowed)

 '--- remove upper case letters...
Disallowed = ucase("abcdefghijklmnopqrstuvwxyz")
Response.Write RemChr(Input, Disallowed)
%>
ASP Code
<%
Private Function RemChr(byVal stringbyVal remove)
    Dim i, j, tmp, strOutput
    strOutput = ""
    for j = 1 to len(string)
        tmp = Mid(string, j, 1)
        for i = 1 to len(remove)
            tmp = replace( tmp, Mid(remove, i, 1), "")
            if len(tmp) = 0 then exit for
        next
        strOutput = strOutput & tmp
    next
    RemChr = strOutput
End Function
%>

AddChr
BinaryToString
CountWord
Format
FormatString
FormatTxt
GetAlphaRegExp
GetNumberRegExp
HexToStr
InstrCount
Library ›› HTML Tag | PHP Function | ASP Function
Page : 873876
Online :
Visited : 396933
 
Liên h | Thêm vào Favorite | Gửi link qua e-mail | Thông tin website
Copright © 2009 KAI Blog
Code by BOINGOnline. Contact email : contact@kai.vn
Theme: default | classic |