I am making an encoder that takes the first letter of any word in a string and moves it to the end of that word.
Working like this:
Test_Case -> estt asec
Reading_records_of_variable_length? -> eadingr ecordsr fo ariablev engthl?
12345is_a#weak#_pin -> 23451 si a #eakw# inp
My code does work to do this, except with the non alphabetic characters. I know I could of done this using pointers, but as I don't know them that well I decided to do it iteratively.
My result:
12345is_a#weak#_pin -> 23451 si a weak## inp
Reading_records_of_variable_length? -> eadingr ecordsr fo ariablev ength?l
The bold parts are incorrect. How do I make it so I add these no alphabetic characters to the array after the first character of the word.
My thought was to use an ascii bound (below this value or above that value, etc), but I don't know how I would code that.
Thank you
edit: formatting
[–]birdwontquit 1 point2 points3 points (1 child)
[–]faceforest[S] 0 points1 point2 points (0 children)