ASP下经常用的字符串等函数参考资料(3)


格式:isobject(expression)
参数:expression 是任意的变量.
例子:
   
结果: true

23.函数: Lbound()
功能:返回一个数组的下界.
格式:Lbound(arrayname[,dimension])
参数:arrayname 是数组变量,dimension 是任意项
例子:
   
结果:0
24.函数 Lcase()
功能:将一字符类型变量的字符全部变换小写字符.
格式:Lcase(string)
参数:string是字串变量
例子:
   
结果:this is lcase!

25.函数 left()
功能:截取一个字符串的前部分;
格式:left(string,length)
参数:string字符串,length截取的长度.
例子: 
结果:this i

26.函数 len()
功能:返回字符串长度或者变量的字节长度
格式:len(string |varname)
参数:string字符串;varname任意的变量名称
例子:

结果:15

27.函数 ltrim()
功能:去掉字符串前的空格.
格式:ltrim(string)
参数:string 字串.
例子: 
结果:Today

29.函数 minute()
功能:返回一数值, 表示分钟
格式:minute(time)
参数: time是时间变量
例子:
结果:23

30.函数 month()
功能:返回一数值, 表示月份
格式:month(time)
参数:time是日期变量
例子:
结果:9

31.函数 monthname()
功能:返回月份的字符串(名称).
格式:Monthname(date [,abb])
参数:date是日期变量,abb=true时 则月份的缩写,
例子:
   
结果:April
32.函数 Now()
功能:返回系统的当前时间和日期.
格式:now()
参数:无
例子:
   
结果: 05/10/00 8:45:32 pm

33.函数: replace()
功能:在字串中查找,替代指定的字串.
格式:replace(strtobesearched,strsearchfor,strreplacewith 

[,start[,count[,compare]]])
参数:strtobesearched是字串; strsearchfor是被查找的子字串;strreplacewith 

是用来替代的子字串.start,count,compare 是任意选项.
例子:
   
结果:this is an orange.

34.函数 right()
功能:截取一个字符串的后部分
格式:right(string,length)
参数:string字符串,length截取的长度.
例子:
   
结果:st!

35.函数 rnd()
功能:返回一个随机数值
格式:rnd[(number)]
参数:number是任意数值.
例子:

结果:0/1数值之一,无randomize(), 则不能产生随机数.
36.函数round()
功能:完整数值
格式:round(expression[,numright])
参数:expression数字表达式;numright任意选项.
例子:

结果: 12
37.函数 rtrim()
功能:去掉字符串后的空格.
格式:rtrim(string)
参数:string 是字串
例子:
   

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2521.html