Hi.
I noticed that there is a lot of repeating code like this:
```
if (strspn(str, " \t\n\r\f") == strlen(str))
```
I personally don't find it particularly readable, not mentioning that
traversing a string twice doesn't look as a good idea (you can check
using objdump that latest GCC 6.2 doesn't optimize this code).
How about rewriting such a code like this?
```
if (pg_str_containsonly(str, " \t\n\r\f"))
```
Corresponding patch is attached. I don't claim that my implementation of
pg_str_containsonly procedure is faster that strspn + strlen, but at
least such refactoring makes code a little more readable.
--
Best regards,
Aleksander Alekseev