It would be nice to add a function to the package, which would 'returns
a string that has whitespace removed from the start and the end, and that has each sequence of internal whitespace replaced with a single space'. It could be called as 'simplify' for example.
1 out of 2 found this review helpful. Was this review helpful to you? Yes No
String::Strip has been around since at least the year 2000 and it is written in XS and is therefore probably faster than this module.
At the very least, both authors should put a SEE ALSO to you each other in their docs.
7 out of 8 found this review helpful. Was this review helpful to you? Yes No
It's one of those things that you constantly find yourself writing, so why not put it in a module. I might still insist that since it's only a regex, it's not worth it as a module (especially a non-core module). But it supports void context and trimming entire lists. It also can differentiate between leading and trailing whitespace.
Regexp::Common has a whitespace module, but cannot differentiate leading and trailing whitespace.
7 out of 7 found this review helpful. Was this review helpful to you? Yes No