help with String manipulation

JT007:
Yes i understand what you are saying but unfortunately i dont have delimiting characters
the format is 255O255|the part of the code which is handling the parsing does not see the end character "|" which has already been stripped.
i need to be able to use the character position instead.
the examples dont offer any suggestion on how to do this.

Using a 4 char array string you can put the first 3 serial chars in array[0], [1], [2], and make [3] = 0.
Then you have a C string suitable for atoi().

i need to be able to use the character position instead.
the examples dont offer any suggestion on how to do this.

Make a variable to hold the final number.
1 Multiple final number variable by 10.
2 Read the 1st serial char, check that it is >= '0' and <= '9' and if so,
subtract '0' and add to the final number variable.
Repeat 1 and 2 two more times.
If no errors then you have read 3 digits and your converted value is in the final number variable.

Otherwise rely on black box function until you learn how simple the basis for the above is.

C++ container classes on an UNO is like Formula 1 cars on a half acre dirt track.
Possible but ....