[thelist] Asp Split

Matt Warden mwarden at gmail.com
Mon May 22 21:20:18 CDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob Smith wrote:
> I must be in stupid land today. I've got a file for input using the text
> stream object:
> 
> <%
> Set fs=Server.CreateObject("Scripting.FileSystemObject")
> Set f=fs.OpenTextFile(Server.MapPath("export.po"), 1)
> %>
> <pre>
> <%
> Dim line_array
> do while f.AtEndOfStream = false
> line = f.ReadLine
> line_array = split(line,"")
> Response.Write line_array(0)
> Response.Write "<br>"
> loop
> %>
> </pre>
> <%
> f.Close
> Set f=Nothing
> Set fs=Nothing
> %>
> 
> This SHOULD print out the first character of each line. Oh no! it prints
> out the first string of characters until it hits the first space. How
> can I split a string into an array of characters?

These may help:

http://lists.evolt.org/archive/Week-of-Mon-20020325/108016.html
http://addressof.com/blog/archive/2004/10/25/1019.aspx

- --
Matt Warden
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEcnFirI3LObhzHRMRAtz8AKDeGXfE7J9RX4v/4MezI8voZbfCuwCgiKqT
B4yMYz0YPMjLKq0JZ/bwQzI=
=0lCa
-----END PGP SIGNATURE-----



More information about the thelist mailing list