Asp.netCommon functions
ABS (number)Obtain the absolute value of a value.
ASC (string)Returns the first character of a string expression.ASCII.
ATN (number)Returns the arc tangent of an angle.
Callbyname (object, procname, usecalltype, [ARGs ()]) Executes the method, setting, or returning the attributes of an object.
Cbool (expression) The conversion expression is Boolean Type.
Cbyte (expression) The conversion expression is Byte Type.
Cchar (expression) The conversion expression is in the convert format.
Cdate (expression) The conversion expression is Date Type.
Cdbl (expression) The conversion expression is Double Type.
Cdec (expression) The conversion expression is Decimal Type.
CINT (expression) The conversion expression is Integer Type.
Clng (expression) The conversion expression is Long Type.
Cobj (expression) The conversion expression is Object Type.
Cshort (expression) The conversion expression is Short Type.
Csng (expression) The conversion expression is Single Type.
CSTR (expression) The conversion expression is String Type.
Choose (index, choice-1 [, choice-2,... [, choice-N]) Select and return the set parameters based on the index value.
CHR (charcode) To ASCII To obtain the character content.
Close (filenumberlist) End of use Open Opened files.
Cos (number) Returns the cosine of an angle.
Ctype (expression, typename) Type of the conversion expression.
Dateadd (dateinterval, number, datetime)Add or subtract the date or time.
Datediff (dateinterval, date1, date2)Calculate the difference between two dates or times.
Datepart (dateinterval, date)Return year, month, day, or time based on the received date or time parameter.
Dateserial (year, month, day)Merge the received parameters into a date-onlyDateType data.
Datevalue (datetime)Obtain the date value that matches the country-specific style and contains the time.
Day (datetime)Return the date according to the received date parameter.
EOF (filenumber)It is returned when the end of an opened archive is reached.True.
Exp (number)Return Based on received ParametersE.
Filedatetime (pathname) The date and time when the file was created.
Filelen (pathname) The length of the returned file, in the unit Byte .
Filter (sourcearray, Match [, include [, compare]) Search for the specified string in the string array. If the array element contains the specified string, it is combined into a new string array and returned. If you want to return an array element that does not contain the specified string Include Set the parameter False . Compare The parameter specifies whether the search is case sensitive. Textcompare Constant or 1 You can.
Fix (number) Remove the fractional part of the parameter and return it back.
Format (expression [, style [, firstdayofweek [, firstweekofyear]) Convert the date, time, and numeric data into a format acceptable to each country.
Formatcurrency (expression [, numdigitsafterdecimal [, includeleadingdigit]) Output the value as the amount type.
Numdigitsafterdecimal The parameter is a decimal number of words, Includeleadingdigit If the integer is 0 Whether to fill in the integer word count.
Formatdatetime (date [, namedformat]) Returns formatted date or time data.
Formatnumber (expression [, numdigitsafterdecimal [, includeleadingdigit]) Return format
. Numdigitsafterdecimal The parameter is a decimal number of words, Includeleadingdigit If the integer is 0 Whether to fill in the integer word count.
Formatpercent (expression [, numdigitsafterdecimal [, includeleadingdigit]) Return numeric data converted to percentage format. Numdigitsafterdecimal The parameter is a decimal number of words, Includeleadingdigit If the integer is 0 Whether to fill in the integer word count.
Getattr (filename)Returns the attribute value of an object or directory.
Hex (number)Convert numeric parameters16Base Value.
Hour (time)The hour field of the return time. The type isInteger.
IIF (expression, truepart, falsepart) When the return value of an expression is True Time execution Truepart FieldProgramOtherwise, execute Falsepart Field.
Instr ([start,] string1, string2) Search String2 The character set by the parameter appears in the character Number of the string, Start Starting with the character number, String1 Is the string to be searched, String2 It is the character to be searched.
INT (number) Returns the maximum integer less than or equal to the value of the received parameter.
Isarray (varname) Determines whether a variable is an array type. If it is an array, it is returned. True Otherwise False .
Isdate (expression) Determine whether the expression content is Datetime Type. If yes, it is returned. True Otherwise False .
Isdbnull (expression) Determine whether the expression content is Null If yes, it is returned. True Otherwise False .
Isnumeric (expression) Determines whether the expression content is Numeric. If the expression content is numeric, it is returned. True Otherwise False .
Join (sourcearray [, delimiter])Merges string arrays into unique strings,DelimiterThe parameter is set to add a new string to each element.
Lcase (string)Converts a string to a lowercase font.
Left (string, length)Obtained from the left of the stringLengthThe parameter specifies the characters in length.
Len (string)Returns the length of a string.
Log (number)Obtain the natural logarithm of a value.
Ltrim (string)Remove the left blank part of the string.
Mid (string, start [, length])Retrieving stringsStratAfter the character set for the parameterLengthLength string. IfLengthIf the parameter is not set, retrieveStartAll subsequent characters.
Minute (time)Obtain the time content, in the formInteger.
Mkdir (PATH)Create a new directory.
Month (date)Obtain the month of the date. The type isInteger.
Monthname (month)Obtain the complete description of the month based on the received month value.
Now ()Obtain the current date and time.
Oct (number)Convert numeric parameters8Base Value.
Replace (expression, find, replace) convert the string specified by Find to replace the string specified by the parameter.
right (string, length) Start from the right of the string length the character with the length specified by the parameter.
rmdir (PATH) remove an empty directory.
RND () between 0 to 1 decimal, if you want to obtain different values each time, add randomize before use.
rtrim (string) Removes the white space on the right of the string.
second (time) second portion of the time content obtained, type: integer .
sign (number) obtain positive or negative values, return positive data 1 , return negative data -1 , 0 return result 0 .
sin (number) returns the sine of an angle.
space (number) obtain the blank string set by Number .
split (expression [, delimiter]) use the delimiter parameter to split a string into a string array.
SQRT (number) returns the square root of a number.
STR (number) convert a number into a string and return it.
strreverse (expression) returns the result after the string content is reversed.
Tan (number)Returns the tangent of an angle.
Timeofday ()Obtain the time that does not contain a date.
Timer ()Obtain0: 00The number of seconds in the current time. The type isDouble.
Timeserial (hour, minute, second)Merge the received parameters into a time-onlyDateType data.
Timavalue (time)Obtain the time value that conforms to the country-specific style.
Today ()Obtain the date that today does not contain the time.
Trim (string)Removes the white space at the beginning and end of the string.
Typename (varname)Obtains the type of a variable or object.
Ubound (arrayname [, dimension])Obtain the final index value of the array,DimensionThe parameter is the final index value specified to obtain the dimension.
Ucase (string)Converts a string to uppercase.
Val (string)Converts a string representing a number to a numeric value. If the string contains non-numeric content, it is removed and merged into a number.
Weekday (date)The date in the parameter is the day of the week, and Sunday is1Monday is2Tuesday is3And so on.
Weekdayname (number)Obtain the name of the week based on the received parameter. The parameter that can be received is1To7, Sunday is1Monday is2Tuesday is3And so on.
//Obtain the location code of Chinese Characters
Byte [] array = newbyte [2];
Array = system. Text. encoding. Default. getbytes ("Ah");
IntI1 = (short) (array [0]-'\ 0 ');
IntI2 = (short) (array [1]-'\ 0 ');
// UnicodeChinese character codes in decoding mode
Array = system. Text. encoding. Unicode. getbytes ("Ah");
I1 = (short) (array [0]-'\ 0 ');
I2 = (short) (array [1]-'\ 0 ');
// UnicodeDecodes Chinese Characters
Stringstr = "4a55 ";
Strings1 = Str. substring (0, 2 );
Strings2 = Str. substring (2, 2 );
Intt1 = convert. toint32 (S1, 16 );
Intt2 = convert. toint32 (S2, 16 );
Array [0] = (byte) T1;
Array [1] = (byte) T2;
Strings = system. Text. encoding. Unicode. getstring (array );
// DefaultMethod to decode Chinese Characters
Array [0] = (byte) 196;
Array [1] = (byte) 207;
S = system. Text. encoding. Default. getstring (array );
//String Length
S = "IamFangun";
Intlen = S. length; // willoutputas6
Byte [] Sarr = system. Text. encoding. Default. getbytes (s );
Len = Sarr. length; // willoutputas3 + 3*2 = 9
//String Addition
System. Text. stringbuildersb = Newsystem. Text. stringbuilder ("");
SB. append ("I ");
SB. append ("am ");
SB. append ("Fangun");