It's not the most elegant solution, but you could try one of the following substring methods when your string has a fixed length,

https://www.programmingsimplified.com/c/source-code/c-substring