How can I Split a string ?

jegesd:
Why not to try to read a first char with charAt() and then based on it result is A do this, if S do that

e.g. if A read the second and third and that is the angle (in this case angle always must be 2 chars) then read 4 th char and it is a direction etc...

The OP should think clearly about the format he is inventing to make it easy to code.

For example if in the Angle example he used a numeric field to indicate left or right then all the messages would have the format
,,;

He could parse out the parameters then branch depending on the character i.e. less code in fewer places.

I am not even sure though why he has three parameters in the Speed and Distance Messages?
Also why not just use 0...360 for the angle rather than introducing Left and Right?
The messages could probably be simplified to all just be;
,;