Function
24. Function LCase () Function: Change the character of a character type to a small write character.
Format: Lcase (String)
Parameters: String is the number of string changes
Example:
<%
Str= "This is lcase!"
Response.Write Lcase (str)
%>
Results: This is lcase!
25. Function Left () Function: Intercepts the front part of a string;
Format: Left (string,length)
Parameters: string strings, length intercept lengths.
Example: <% =left ("This is a test!", 6)%>
Results: This I
26. Function Len () Function: Returns the length of a character or variable
Format: Len (string |varname)
Parameters: string strings; varname arbitrary variable name
Example:
<%
Strtest= "This is a test!"
Response.Write Left (strtest)
%>
Results: 15
27. Function LTrim () Function: Remove the space before the string.
Format: LTrim (String)
Parameters: String String.
Example: <% =ltrim ("This is a test!")
Results: This is a test!
28. Function mid () Function: intercepts strings from strings.
Format: Mid (String,start [, length])
Parameters: String strings, start intercept start, length to intercept the length.
Example:
<%
Strtest= "This are a test, today is monday!"
Response.Write Mid (strtest,17,5)
%>
Outcome: Today
29. Function minute () Function: Returns a value indicating the Minutes
Format: Minute (time)
Parameters: Time is the change in time
Example lt;% =minute (#12:23:34#)%>
Results: 23
30. Function month () Function: Returns a value indicating the month
Format: Month (time)
Parameters: Time is the date change
Example <% =month (#08/09/99)%>
Results: 9
31. Function MonthName () Function: Returns the string (name) of the month.
Format: MonthName (date [, ABB])
Parameters: Date is the change in dates, the abb=true of the month,
Example:
<% =monthname (#4/5/99#)%>
Outcome: April
32. Functions Now () Function: Returns the system's time and date.
Format: Now ()
Parameters: No
Example:
<% =now ()%>
Results: 05/10/00 8:45:32 pm
33. Function: replace () Function: Find in a string instead of the specified string.
Format: replace (Strtobesearched,strsearchfor,strreplacewith [, Start[,count[,compare]]])
Parameters: Strtobesearched is a string; The strsearchfor is the substring of the lookup, and the strReplaceWith is an alternative substring. Start,count,compare is any option.
Example:
<%
Strtest= "This is an apple."
Response.Write Replace (strtest, "Apple", "orange")
%>
Results: This is an orange.
34. Function Right () Function: Intercepts the back part of a string
Format: Right (string,length)
Parameters: string strings, length intercept lengths.
Example:
<%
Strtest= "This is a test!"
Response.Write Right (strtest,3)
%>
Outcome: st!
35. Function rnd () Function: Returns a random numerical value
Format: rnd[(number)]
Parameters: Number is any number value.
Example:
<%
Randomize ()
Response.Write Rnd ()
%>
Results: One of the 0/1 values, Randomize (), cannot produce random numbers.
36. Function round () Function: Full numerical value
Format: Round (Expression[,numright])
Parameters: expression numbers, numright arbitrary options.
Example:
<%
i=12.33654
Response.Write Round (i)
%>
Results: 12
37. Function RTrim () Function: Remove the space after the string.
Format: RTrim (String)
Parameters: String is a string
Example:
<%
Response.Write RTrim ("This is a test!")
%>
Results: This is a test!
38. Function second () Function: Returns an integer value.
Format: Second (time)
Parameters: Time is an effective time expression;
Example lt;% =second (# 12:28:30#)%>
Results: 30
39. Function StrReverse () Function: Returns a string that is in reverse alignment with the original string.
Format: StrReverse (String)
Parameters: String is a string
Example <% =strreverse ("This is a test!")
Results:!tset a Si siht
40. Function time () Function: Returns the time value of the previous system.
Format: Time ()
Parameters: No
Outcome: 9:58:28 Am
41. Function Trim () Function: Delete the string before, after the space.
Format: Trim (String)
Parameters: String String.
Example:
<%
Strtest= ' This is a test! "
Response.Write Trim (strtest)
%>
Results: This is a test!
42. Function UBound () Function: Returns the upper bound of a group.
Format: Ubound (expression [, dimension])
Parameters: Expression is a number of expressions/numbers, dimension is any
Example:
<%
i = Array ("1", "2", "3")
Response.Write UBound (i)
%>
Results: 2
43. Function: UCase () Function: Change the character of one character type into a large write character.
Format: Ucase (String)
Parameters: String is the number of string changes
Example:
<%
Str= "This is lcase!"
Response.Write Lcase (str)
%>
Results: This is lcase!
44. Function VarType () Function: Returns a constant number of changes (integer)
Format: Vartype (varname)
Parameters: VarName is the variable name of any type.
Example:
<%
I=5
Response.Write VarType (i)
%>
Results: 2 (2 for integer, need to refer to ASP constant code.)
45. Function Weekday () Function: Returns an integer that corresponds to the day ordinal of a week.
Format: Weekday (date [, Firstofweek])
Parameters: Date is the change of dates, Firstofweek is optional.
Example:
<%
d= # 5/9/00 #
Response.Write Weekday (d)%>
Results: 3 (3 indicates Tuesday)
46. Function WeekdayName () Function: Returns a string that corresponds to the day of the week.
Format: WeekdayName (Weekday[,abb[,firstdayofweek]])
Parameters: Weekday as the date change, Abb,firstdayofweek is optional.
Example:
<%
D = #8/4/99#
Response.Write WeekdayName (d)
%>
Outcome: Wednesday
47. Function year () Function: Returns the year in which the date table is in.
Format: Year (date)
Parameters: Date is a valid day-table expression
Example:
<% =year (#8/9/99#)%>
Results: 1999
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.