I'm trying to have my program search through a string to find the character '-' when it finds it, it will look at the next character and based on what that is it will run a certain function.
i.e.
Expand|Select|Wrap|Line Numbers
- if(string[i+1] == 'a'){
- functiona(int i);
- }
is there a way that i can have the word placed into the string and the rest of the characters in the string moved down accordingly?
so if my string was "hello -a world!" and i wanted to put something like "small" starting at the '-' the end result would be "hello small world" instead of "hello smallrld"
Thanks in advance for any advice :)
p.s. i apologize for the use of hello world... so overused.