[string totitle] does not actually convert to title case
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tcl8.6 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The [string totitle] operation is falsely named and falsely documented. The actual behavior of this operation gives /sentence case/, where only the first character of the whole string is capitalized. Title case requires the first character of every word in the string to be capitalized.
I suggest:
* rename "totitle" to "tosentence"
* create a new "totitle" function that actually delivers title casing
Falling short of the above, if it's determined that changing this behavior would trigger too many problems with pre-existing code, at a minimum the man page should be updated to make the false naming clear. It should start with something like "Does not return title case but actually returns sentence case" and other mentions of "title case" in the description should be replaced with "sentence case".