asp truncates the specified string, and ASP intercepts the string at the specified location

Updated on technology 2024-04-17
12 answers
  1. Anonymous users2024-02-07

    Two methods:

    1: fileext=right("images/", 3) two: filename="images/"

    fileext=mid(filename,instr(filename,".")+1)

    The value of fileext is the result.

  2. Anonymous users2024-02-06

    There are a lot of functions in VB that manipulate strings, and combining some of them makes it easy to do what you need.

    I'll sort some out below.

    len len(string|varname) returns the number of characters in a string, or the number of bytes required to store a variable.

    trim trim(string) removes the spaces before and after the string.

    ltrim ltrim(string) removes the space in front of the string.

    rtrim rtrim(string) removes the spaces after the string.

    mid mid(string,start,length) starts from the start character of the string string to get the length of the string, if the third parameter is omitted, it means the string starts with the start character and ends at the end of the string.

    Left Left(String,Length) A string that takes the length from the left side of the string.

    Right Right(String,Length) A string that takes the length of the length from the right side of the string string.

    lcase lcase(string) converts all uppercase letters in a string string to lowercase letters.

    ucase ucase(string) converts all uppercase letters in a string string to uppercase letters.

    strcomp strcomp(string1,string2[,compare]) returns the comparison of the string1 string with the string2 string, 0 if both strings are the same, -1 if less than, and 1 if greater than 1

    instr instr(string1,string2[, compare]) returns the position where the string1 string first appeared in the string2 string.

    split split(string1,delimiter[, count[, start]]) splits the string into a one-dimensional array based on the delimiter, where the delimiter is used to identify the substring bounds. If omitted, use a space (""as a separator. This one can come in handy.

  3. Anonymous users2024-02-05

    This can be solved by split() and ubound(), which splits the string into an array, and the ubound() function, which counts the number of arrays.

  4. Anonymous users2024-02-04

    1.Use the string function, mid, left, right via midstr1="abasdflkj#username#sdfkljkl"

    str2="The amount of deposits absorbed by the key is quickly classified"

    f_str1 = mid(str1,instr(str1,"#")+1,instr(instr(str1,"Sharp digging")+1,str1,"#",1)-instr(str1,"#

    f_str2 = mid(str2,instr(str2,"#")+1,instr(instr(str2,"#")+1,str2,"#",1)-instr(str2,"#

    Silver core. The ** written is more messy, and I understand Fei Fangsen.

    2.with arrays.

    f_str1 = split(str1,"#f_str2 = split(str2,"#

  5. Anonymous users2024-02-03

    Use the split function.

    The returned array is accompanied by Min = split(string slippery, delimiter) arr1 = split(str1,"#f_str1 = arr(1)

    arr2 = split(str2, "Confidence f str2 = arr(1).

  6. Anonymous users2024-02-02

    str1="abasdflkj#username#sdfkljkl"

    str2="Absorb the amount of money collected by the deposit and banquet key classification is fast and fast"

    f_str1 = split(str1,"#f_str2 = split(str2,"#""Lu Xiang Clan br >"f_str2)

  7. Anonymous users2024-02-01

    cha=split(str,"

    'Look for the "contain" from the str

    The position of the character.

    str=cha(0) 'If the index of the first eligible position is 0, for example, if cha(1) is the value of str

    str=replace(cha,","") 'Remove the previous ", and all that remains is the required characters.

    str 'Output.

  8. Anonymous users2024-01-31

    If you use only the first character, use <%=split(str,"

    If you want both, use arrays.

    strarr=split(str,"

    You get an array.

    strarr(0) has a value of 1111

    strarr(1) has a value of aaa

    strarr(2)

    .And so on.

  9. Anonymous users2024-01-30

    a = "123456788"

    a = mid(a,3,4) 'Parameters: String, start position, truncated length.

    To get to the first number, you only need to subtract the starting position, as in mid(a,3,7-3).

  10. Anonymous users2024-01-29

    It's the mid function, and you can look at the function description more.

  11. Anonymous users2024-01-28

    mid (string to be intercepted, position to start intercepting, length to be intercepted) to intercept a character of the specified length from any position.

  12. Anonymous users2024-01-27

    You can also use mid()! But you have to determine the number of digits!

Related questions
11 answers2024-04-17

First of all, it is necessary to understand what a binary tree is (and I guess the subject also understands). >>>More

11 answers2024-04-17

Valid character constants are:

a.'084' is not legal, there is no 8 in octal. >>>More

10 answers2024-04-17

There is no difference between a string and an array of characters. >>>More

3 answers2024-04-17

Strange indeed, the result of my experiment is that if the string variable is initialized first, the subscript can be used to read and write the string variable normally. >>>More

12 answers2024-04-17

Alignment is how paragraph content is arranged horizontally between the left and right boundaries of the document. There are a total of 5 alignment styles in Word: Left Alignment, Right Alignment, Center Alignment, Ends Alignment, and Scattered Alignment. >>>More