• 主页

# 一个函数

liberationxin 2004-04-01 09:41:52

...全文
1 点赞 收藏 8

8 条回复

nchen123 2004-04-01

try:
-----------------------------------
dim str="12345671200@sina.com"
response.write instrRev(".")
^ 有误

possible_Y 2004-04-01

right(sting,n) 返回字符串string中从右边数的n个字符

x="abcdefg"
y=right(a,1) 'y为g
z=right(a,3) 'z为efg

InStrRev 函数

InStrRev(string1, string2[, start[, compare]])

string1

string2

Start

compare

compare 参数可以有以下值：

vbBinaryCompare 0 执行二进制比较。
vbDatabaseCompare 2 执行基于包含在数据库（在此数据库中执行比较）中的信息的比较。

InStrRev 返回以下值：

string1 为零长度 0
string1 为 Null Null
string2 为零长度 start
string2 为 Null Null
string2 没有找到 0

start > Len(string2) 0

Dim SearchString, SearchChar, MyPos
SearchString ="XXpXXpXXPXXP" ' String to search in.
SearchChar = "P" ' Search for "P".
MyPos = InstrRev(SearchString, SearchChar, 10, 0) ' A binary comparison starting at position 10. Returns 9.
MyPos = InstrRev(SearchString, SearchChar, -1, 1) ' A textual comparison starting at the last position. Returns 12.
MyPos = InstrRev(SearchString, SearchChar, 8) ' Comparison is binary by default (last argument is omitted). Returns 0.

guokai1217 2004-04-01

InStrRev

possible_Y 2004-04-01
right(sting,n) 返回字符串string中从右边数第n个字符

x="abcdefg"
y=right(a,1) 'y为g

nchen123 2004-04-01
<script language="vbscript">
a = "Good morning!"
i = InStrRev(a, "o")
msgbox i '7
</script>

stefli 2004-04-01
try:
-----------------------------------
dim str="12345671200@sina.com"
response.write instrRev(".")

nchen123 2004-04-01
InStrRev

jonasxujun 2004-04-01

ASP

2.8w+

ASP即Active Server Pages，是Microsoft公司开发的服务器端脚本环境。