README.md

December 4, 2022 ยท View on GitHub

String to Array or Byte

Description

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

More Info

A string or integer

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

An array

Submitted On
BySubodh Dash
LevelIntermediate
User Rating5.0 (30 globes from 6 users)
CompatibilityASP (Active Server Pages), VbScript (browser/client side)

Category |Strings World |ASP / VbScript Archive File |

API Declarations

Free to use/distribute

Source 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