Invisible characters and unintended spaces can cause validation issues, inconsistencies, and unexpected behavior in applications. This function detects and removes them before saving the input to the database, ensuring data integrity and reliability.
✅ Detects invisible characters (zero-width, non-breaking spaces, Unicode control characters).✅ Removes unwanted spaces (configurable to include or exclude normal spaces).✅ Supports full-string or front/back-only cleaning.✅ Optimized for performance and integration with OutSystems.
TextToCheck
IsSpaceIncluded
True
False
IsCheckAllString
CleanedText
📌 Before Cleaning🔹 Hello World → (Contains hidden Unicode characters)🔹 " Text " → (Leading and trailing spaces)
Hello World
" Text "
📌 After Cleaning (Configured to Remove Spaces & Hidden Characters)✅ "Hello World"✅ "Text"
"Hello World"
"Text"
✔ Use Before Saving: Always clean text before storing in the database.✔ Combine with Trim(): Further optimize for whitespace removal.✔ Enable Logging (Optional): Track and monitor invalid input patterns.