Search Tools Links Login

String to Array or Byte


Converts a string or an integer to an array of characters/bytes

Original Author: Subodh Dash

Inputs

A string or integer

Assumptions

Use it somewhat like this
dim myarray
myarray = StringToArray("324gfsdgfd6,58.kfdsfd//osid")
'You can manipulate myarray as per your wish. The individual elements can be accessed like :
dim p
for p = 0 to ubound(myarray)
msgbox myarray(p)
next

Returns

An array

API Declarations

Free to use/distribute

Code

Function StringToArray(str_or_int)
dim l, arr, i
l = len(str_or_int)
redim arr(l-1)
for i = 0 to l-1
arr(i) = mid(str_or_int,i+1,1)
next
StringToArray = arr
end function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 66 times

Categories

ASP/ HTML

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.