In embedded CLI (command-line interface) systems, you often need to parse commands typed by the user into tokens (like command and its arguments). A lightweight parser is used to extract each word (separated by spaces) into an array of strings.
Your task is to:
Example-1
Input:
led set 3 on
Output:
led
set
3
on
Example-2
Input:
uart config 9600 8N1
Output:
uart
config
9600
8N1
Example-3
Input:
status
Output:
status
Input
led set 3 on
Expected Output
led set 3 on