I have a string like this, Fy 2002.car.state.
I need to split this based on value, if the value is 0 I need split like "Fy 2002","car","state" separately.If the value is 1, I need split like this "Fy 2002.car","state".
How do I achieve this without using for loop? Thanks.
index = 2? and if so, what should be the result look like?