copy chars to array but remove a character

Hello all,

I need to copy the contents of a variable (called resource) into an array (called fname) but omit the "/" forward slash that appears at the beginning of the string. The variable resouce will contain a single string.

I know how to copy the contents of the variable to the array but it's the bit about removing the "/" that has me a bit confused.

Any help/advice greatly appreciated.

Phil

Just use an if in your loop to test whether or not the char to be copied (or not copied) is a '/'.

Hope this helps.
Topic archived. No new replies allowed.