ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.
Watkins
|
Utilizing The Split Function |
|
|
|
Here is an example of how the script works. Enter a
several stock quotes below seperated by commas and then submit it. For example: “pep,
tgo, yum, dg” would be a correct example, but “pep tgo yum dg” would not.
In a follow up to this article, I will be showing you how to let users enter the
information almost anyway they want and still let it come out correct on the backend.
You entered the following: 255 then
response.write “Your string was too big. This limitation is only here for the purpose of server performance. This is not the limitation of the split function, infact, I do know the limitation. Heck, maybe there isn’t. :)”
elseif len(strStockQuotes) = 0 or isNull(strStockQuotes) then
response.write “”
else
araStockQuotes = split(strStockQuotes, “,”)
intElements = ubound(araStockQuotes) ‘ Get the number of elements.
response.write “
”
For i = 0 to intElements
strStockQuote = araStockQuotes(i)
response.write strStockQuote & “ ”
Next
response.write “
”
end if
%>
|
|