Splitting a string with awk

Hi all,
I want to split a string in awk and treat each component seperatley.
I know i can use:

split ("hi all", a, " ")

to put each delimited component into array a.

However when i want to do this with just a string of chars it does not work

split ("hi", a, "");
print a[1];

prints hi.

Any idea on how I might do this in awk?

Thanks

Hard to tell without seeing your input file. Basically it should be like this:

echo 'aa:bb:cc:dd:ee'| awk '{split($0,array,":")} END{print array[2]}'
bb

Zaxxon,
Thanks for your help.
Yes I understand the principal of splitting the string based on a given field seperator and placing each new field in an array.
My problem is that my string contains no field seperators.
From your example how would you split if the string contained no ":" and was simply aabbccddee.
I would like to assign each letter of the string to a place in the array.

Thanks

At least the mawk manual page says that if the separator is the empty string, no splitting will take place (this is quite unlike Perl). But anyway, what's wrong with simply looping over each character with substr?

Not sure if this helps, but if using gawk you can unset FS like this....

$ echo "abcd" | gawk -F "" '{print $2}'
b
echo "hello all" | \
awk '{
   gsub(".", "& ")
   split($0, a, " ")
   print a[1]
}'
echo 'hi' | awk '{split($0,array,"\n")} END{print array[1]}'