1. Split (expression, delimiter, count, comparison)
Returns a 0-based one-dimensional array containing the specified number of substrings.
Expression: Required. String expression, including substring and delimiter. If expression is a zero-length string, Split returns an empty array, that is, an array without elements and data.
Delimiter: Optional. The character used to identify the substring boundary. If omitted, use a space ("") as a separator. If the delimiter is a zero-length string, a single-element array containing the entire expression string is returned.
Count: Optional. The number of substrings returned,-1 means that all substrings are returned.
Comparison: Optional. The compare parameter can have the following values: 0 performs a binary comparison; 1 Perform text comparison; 2 Perform the comparison according to the information contained in the database where the comparison is performed.
2.Replace (expression, find, replace, compare, count, start)
Returns a string in which a specified number of substrings are replaced by another substring.
Expression: Required. A string expression that contains the substring to replace.
Find: Required. The substring being searched.
Replacewith: required. The substring used for replacement.
Start: Optional. The position in the expression where the search for the substring begins. If omitted, the default value is 1.
Count: Optional. The number of substring substitutions performed. If omitted, the default value is-1, which means that all possible substitutions are made.
Comparison: Optional. The parameter values are the same as above.
3.Mid (string, start, length)
Returns a specified number of characters from a string.
String: The string expression from which the character is returned. Returns Null if the string contains Null.
Start: the start:string position of the extracted character part in the string. If start exceeds the number of characters in string, Mid will return a zero-length string ("").
Length: the number of characters to return. If omitted or the length exceeds the number of characters in the text (including the first character), all characters in the string from the beginning to the end will be returned.
4.LTrim (string), RTrim (string), Trim (string)
Returns a copy of a string without leading spaces (LTrim), trailing spaces (RTrim), or leading and trailing spaces (Trim).
String: This parameter is any valid string expression. Returns Null if the string parameter contains Null.
5.InStr (start, string 1, string 2, compare)
(InstrRev(start,string 1,string2,compare))
Returns the position where one string appears in another string.
Returns the position where one string appears in another string.
Start: Optional. A numeric expression used to set the starting position of each search. If omitted, the search will start at the position of the first character. If start contains Null, an error will occur. If compare is specified, the start parameter is required.
String 1: required. A string expression that accepts the search.
String2: required. The string expression to search for.
Comparison: Optional. The parameter values are the same as above.
6. String (number, character)
Returns a repeating string of the specified length.
Number: Returns the length of the string. Returns Null if the number parameter contains Null.
Character: Specifies the character code of a character or string expression, where the first character of the string expression is used to compose the returned string. Returns Null if the character parameter contains Null.
7. Spaces (Numbers)
Returns a string consisting of a specified number of spaces.
Number: The parameter is the number of spaces required by the user in the string.
8. Left (string, length) and right (string, length)
Returns a specified number of characters from the left (right) side of a string.
String: A string expression that returns the leftmost (right) character. Returns Null if the string parameter contains Null.
Length: Numeric expression indicating the number of characters to return. If 0, a zero-length string ("") is returned; If it is greater than or equal to the total number of characters in the string parameter, the entire string is returned.
9.Len (string | varname)
Returns the number of characters in a string or bytes required to store a variable.
String: Any valid string expression. Returns Null if the string parameter contains Null.
Varname: Any valid variable name. Returns Null if the varname parameter contains Null.
10. String
Returns the ANSI character code corresponding to the first letter of a string.
String: This parameter is any valid string expression. If the string parameter does not contain characters, a runtime error will occur.
1 1.Chr (character code)
Returns the character corresponding to the specified ANSI character code.
Charcode: Parameters are numbers that can recognize characters. Numbers from 0 to 3 1 represent standard unprintable ASCII codes. For example, Chr( 10) returns a newline character.
12.LCase (string), UCase (string)
Returns the lowercase (uppercase) form of a string, leaving all uppercase (lowercase) letters and non-alphabetic characters unchanged.
String: This parameter is any valid string expression. Returns Null if the string parameter contains Null.
13. Join (list, separator)
Returns a string created by concatenating many substrings contained in an array.
List: Required. A one-dimensional array containing substrings to concatenate.
Delimiter: Optional. The character used to separate substrings in the returned string. If omitted, a null character ("") will be used. If the delimiter is a zero-length string, all items are listed in the same list without delimiter.
14.StrComp(string 1,string2,compare)
Returns a value indicating the result of string comparison. The StrComp function has the following return values:-1, 0, 1, Null.
String 1, string2: required. Any valid string expression.
Comparison: Optional. The parameter values are the same as above.
/kloc-0 15.StrReverse (string)
Returns a string in the reverse order of the specified string.
String: This parameter is the string to be inverted. If the string is a zero-length string (""), the zero-length string is returned. If string 1 is Null, an error will occur.
Secondly, introduce other functions of VBScript.
1. option explicitly
Used for script-level coercion to explicitly declare all variables in the script. If you use Option Explicit, the statement must appear before any procedure in the script. When using the Option Explicit statement, you must explicitly declare all variables with Dim, Private, Public or ReDim statements. If you try to use an undeclared variable name, an error will occur.
2.UBound(arrayname,dimension)(LBound(arrayname,dimension))
Returns the maximum available subscript of the specified array dimension. (Returns the minimum available subscript for the specified array dimension).
Arrayname: Array variable name, following the standard variable naming convention.
Dimension: An integer indicating the lower limit of the dimension to be returned. Use 1 to represent the first dimension, use 2 to represent the second dimension, and so on. If the dimension parameter is omitted, the default value is 1.
The UBound function is used with the LBound function to determine the size of the array. The LBound function can be used to determine the lower bound of array dimensions. The default lower bound for all dimensions is 0.
3.IsArray,IsDate,IsEmpty,IsNull,IsNumeric,IsObject
Determines whether an array, a date, a null value, a null value, a numeric value or an object.
4.CBool,CByte,CCur,CDate,CDbl,CInt,CLng,CSng,CStr
Variable type conversion functions, which are converted into Boolean, Byte, Currency, Date, Double, Integer, Long, Single and String types respectively.
5. Go on to the next step when an error occurs.
Start the error handler. Without the On Error Resume Next statement, any runtime error will be fatal, that is, an error message will be displayed and the operation will be terminated. On Error Resume Next will cause the program to continue execution from the statement immediately after the statement that caused the error, or from the statement immediately after the most recent calling procedure (including On Error Resume Next statement). Regardless of the runtime error, the statement can continue to execute the program, and then you can build an error handling routine inside the procedure. When another procedure is called, the On Error Resume Next statement becomes inactive. Therefore, if you want to handle internal errors in a routine, you should execute an On Error Resume Next statement in each called routine.
6. uh-huh {Property | Method}
Uh ... Number is the wrong number. Uh ... Throwing generates a runtime error in your code. Uh ... Clear can be used to reset Err.
7.RGB (red, green and blue)
Returns an integer representing an RGB color value.
Red: required. An integer between 0 and 255 that represents the red part of the color.
Green: required. An integer between 0 and 255 that represents the green part of the color.
Blue: required. An integer between 0 and 255 that represents the blue part of the color.
8. Function
[Public | Private] function name [(arglist)]
[statement]
[name = expression]
[Exit function]
[statement]
[name = expression]
End function
Declare the names, parameters and codes that make up the body of the function procedure.
Public: indicates that the function procedure can be accessed by all other procedures in all scripts.
Private: indicates that the Function procedure can only be accessed by other procedures in the script that declares it.
Name: name: the name of the function, following the standard variable naming convention.
Arglis: a list of variables, representing the parameters passed to the function procedure when calling. Separate multiple variables with commas.
Statement: any set of statements executed in the body of a function procedure.
Expression: Function return value.
9. Process
[Public | Private] child name [(arglist)]
[statement]
[outlet connector]
[statement]
End joint
Declare the names, parameters and codes that make up the Sub procedure.
10.set object var = { object expression | Nothing }
Assign an object reference to a variable or property.
Objectvar: The name of a variable or property that follows the standard variable naming convention.
Objectexpression: An expression consisting of an object name, another variable that has been declared as the same object type, or a function or method that returns an object of the same object type.
None: stops the association of objectvar with any specified object. When no other variable references the object originally referenced by objectvar, specifying it as Nothing will release all system and memory resources associated with the object.
1 1.Rem comment or "comment"
Used to include explanatory comments in a program. The comment parameter is the comment text that needs to be included. There should be a space between the Rem keyword and the comment.
12. Date series (year, month and day)
Returns a variable of the date subtype of the specified year, month and day.
13. Time series (hours, minutes, seconds)
Returns a variable of the date subtype, which contains the time of the specified hour, minute and second.
14. Date, time and now
Date and time of the system.
15. Year, month, day, hour, minute, second
Divide dates or times into years, months, days, hours, minutes and seconds.
16.DateDiff (interval, date 1, date 2)
Interval: Required. Represents a string expression used to calculate the time interval of date 1 and date2.
Date 1, date2: required. Date expression. Two calculation dates.
The interval parameter can have the following values:
Yyyy year
Q quarter
M month
Y number of days in a year
D day
W how many days are there in a week?
week
H hours
M minutes
S seconds
17.Rnd (number)
The number parameter can be any valid numeric expression. The Rnd function returns a random number less than 1 but greater than or equal to 0. To generate a random integer within a specified range, use the following formula:
int((upper bound-lower bound+ 1)* Rnd+lower bound)
Here upperbound is the upper bound of this range and lowerbound is the lower bound of this range.
18. Type name (varname)
Returns a string that provides information about the Variant subtype of a variable.
The TypeName function returns the following values:
Byte value
Integer integer value
Long integer
A single-precision floating point value
Double precision floating-point value
Currency value
Decimal value
Date date or time value
String string value
Boolean value; Right or wrong
Empty is not initialized.
Null has no valid data.