dropWhileEnd package:text

O(n) dropWhileEnd p t returns the prefix remaining after dropping characters that satisfy the predicate p from the end of t. Examples:
>>> dropWhileEnd (=='.') "foo..."
"foo"
O(n) dropWhileEnd p t returns the prefix remaining after dropping characters that satisfy the predicate p from the end of t. Examples:
dropWhileEnd (=='.') "foo..." == "foo"