Convert a string into dynamic array

if my input is a string of length 1 but consists of many words (for ex: string = “i want a solution”)
i want to convert it into a dynamic array by using System Verilog .
how can i do this?

In reply to sreelaxmi:

See What is the most effective way in systemVerilog to know how many words a string has? | Verification Academy