Your goal is to write code that makes a "string" from a string in the least amount of bytes possible, as per the rules of code-golf. Standard loophole rules apply.
To make a string, you have to assume the string contains only alphabetical characters and basic punctuation such as the period, comma, colons and semicolons, exclamation marks, and question marks. If not, your program can return your language's false value (
False, etc.) instead of making the string.
Spaces and the aforementioned basic punctuation are ignored in the output, so you can strip them before you make the string.
The string will move up or down based on if it has a higher value than the previous letter's position; if it's the same, it stays.
In this example, the string goes down because the characters are of a higher value than the previous one.
ABC A B C
This example is like the previous but also shows that case doesn't matter when deciding to go down or up.
AbC A b C
The next example goes up as well.
ABCDEFEDCBA A A B B C C D D E E F
This test case includes same-letter conditions.
Roof fluff ff oo l ff R u
The final test case is very complex.
The quick, brown fox jumped over the lazy dog. f d d g e c b o n o j m e o e e a y o h q i k r w x u p v r h l z T u t