in reply to [OT] c code
Here is a tutorial about string manipulation. https://perlmaven.com/string-functions-length-lc-uc-index-substr