Hi Am 2025-04-07 09:14, schrieb Rowan Tommins [IMSoP]:
I think a function for "string is zero length or contains only whitespace" would potentially be useful
And for that one it would need to be defined what whitespace is. Is it just the ASCII whitespace characters? Is it Unicode whitespace? Is it also Unicode non-whitespace that renders as blank?
To give an example of the complexity here, this is a `trim()` function that I implemented to handle all kinds of “blank input abuse”, while trying not to break legitimate use-cases of non-Latin languages:
https://github.com/WoltLab/WCF/blob/5c6568807aa22ce337e7527f75c7a8fb2047bf67/wcfsetup/install/files/lib/util/StringUtil.class.php#L90-L141 Best regards Tim Düsterhus