Disclaimer: I’m totally abusing the fact that there are people here that really know what they’re doing when it comes to strings, this has little to do with Julia.
When working with databases that store strings, sometimes the string might include a character that is invalid, that is, it fails
isvalid. I have some control over the input to these databases. So I could limit the user’s input to exclude certain characters, all in the interest of keeping the data valid for the modest cost of user expressiveness. How would you best limit a user’s input to guarantee the string is valid?