Mid
The Mid function will extract a portion of a string (a sub-string)
from a character string. You specify the starting position and, optionally,
the number of characters to extract. The function returns the middle
length characters of the source string.
If the length parameter is left off, the Mid function will
return all characters starting at pos until the end of the source
string.
Const sText = "The quick brown fox" Response.Write "Extract: " & Mid(sText, 5, 11) & "<BR>" Response.Write "Extract: " & Mid(sText, 11) & "<BR>"
You may notice that when you leave off the length argument, the
function behaves much like the Right function. The main
difference is that with the right function you tell it how many
characters you want and the mid function, you tell it the starting
character to extract from.
|
 |

|