What am I missing here? Any lossless compression algorithm works, even "string.reverse" would apply.
What am I missing here? Any lossless compression algorithm works, even "string.reverse" would apply.
Like, I've had the situation of seeing a poorly-marked name string and going "I think that's 'Last, First' formatting, but I'm really not certain..." Or if you do any formatting change you'll get bizarre problems like apostrophes becoming directional quotes.
But yes, the rule-as-written isn't right, and I'm not sure what was meant.
Like transform "Mister" to "Mr"
Always ask the question you actually mean to ask.
Frequently someone's /name/ is part of a mailing ADDRESS. You can, and maybe should, limit this to a individual lines. However the only way to be SURE is to give an actual freeform multi-line input box, like a textarea.
If you want a string to greet someone as, ask for that, and store it separately.
If you want a title to display within a directory listing, accept that.
Generally, do not decompose things for your users, EXCEPT possibly client side while populating form elements for their convenience (and verification/correction).