Home
    Registration
    FAQs
    Terms of service
    Contact us

    Learn ASP
    Databases
    Articles

A string is an array, a series of letters and numbers between two "s.   Strings are used to hold text and numbers in a human-readable form.  An example of a string is:

JJsString = "I am a BIG string of useless text."
AlfsString = "I am a small string."

There is only one kind of math you can perform on strings because strings are not numbers that the computer understands but letters and numbers.  The +, add, will combine two strings into one string like so:

HHE = "May I see that." + "  It looks cool".

HEE would be "May I see that.  It looks cool."

You can also use the & sign which will combine any variable with a string (converting non-string variables to strings just for that moment)

i = 5
HHE = "My number is " & i

HHE would be "My number is 5"

There are a number of functions you can use on strings.  Some of the more common are:

  • val(string) to convert a string or the number part of it to a number variable.
  • instr(start, string, string2) to give the number position of a place in string where string2 might be seen starting at the number variable start.
  • mid(string, start, length) to return the string of text length characters in size starting at start in string.
  • cstr(number) to convert a number variable into a string.
By: Matthew Holder