Is the String in Order?

Published by Matt in

Create a function that takes a string and returns true or false, depending on whether the characters are in order or not.

Examples

is_in_order("abc") ➞ true

is_in_order("edabit") ➞ false

is_in_order("123") ➞ true

is_in_order("xyzz") ➞ true

Notes

You don't have to handle empty strings.

Watch a quick demo on how Edabit works.