3 ms·
This is particularly annoying when trying to sanitize input in a language like Java, where String.trim() only removes space (maybe tab?) and the pre-defined Reg
by LgWoodenBadger 6y ago
This is particularly annoying when trying to sanitize input in a language like Java, where String.trim() only removes space (maybe tab?) and the pre-defined Regex classes in Pattern define some of the whitespace characters, but not all.
Horizontal whitespace characters [ \t\xA0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000]
Vertical whitespace characters [\n\x0B\f\r\x85\u2028\u2029]
Whitespace characters [ \t\n\x0B\f\r]