Today i came across this problem, how to split out / differentiate is str and is int from a random input? Example, my user can input as below:-
- A1 > str:A, int:1
- AB1 > str:AB, int:1
- ABC > str:ABC, int:1
- A12 > str:A, int:12
- A123 > str:A, int:123
my current script is using substr(input,0,1) to get str and substr(input,-1) to get int, but it will give error if having input for case 2,3,4,5 or any others style of user input
Thanks