This is more of a training exercise, but I was hoping it would help.
I want to create a function like this:
function array_to_array ($stuff, $new_type){ $new_stuff = $stuff -as $new_type $new_stuff }
I have a problem with passing in strings or even a value like [char]
for new_type. I think I need to do something like $type = [char]
, but I'm trying to keep it as string as possible.
Is there anyway to do this? How to activate a line?
source share