help with String manipulation

Thanks for the replies,
i have taken onboard all of your ideas and given them all a try.

As Nick has noticed, i still working on a RS485/modbus communication project

the command was going to be the device ID xxx - a function "o" being Output (Digital) and yyy being the value/byte sent to the slave device to drive the digital values which are Bit weighted.

This was going to be the structure and would be similar format for all commands from a host PC to the RS485 master device.
the numbering format was to be 3 characters no matter what and the function would always be a character.

From Pauls earlier post the comma delimited suggestion appears to be the most simplistic and straight forward method.

It should now allow me to to create address IDs of any size - say 4000 The function command could be similar, i will probablly keep to values in 1 byte ie, 0 to 255 as Nick Gammons RS485 comms example uses Bytes in the message transfer.

Its a steep learning curve, thank you all for your assistance, much appreciated