[Bug 1935749] [NEW] [string totitle] does not actually convert to title case

Bill Yikes 1935749 at bugs.launchpad.net
Sat Jul 10 16:28:39 UTC 2021


Public bug reported:

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".

** Affects: tcl8.6 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to tcl8.6 in Ubuntu.
https://bugs.launchpad.net/bugs/1935749

Title:
  [string totitle] does not actually convert to title case

Status in tcl8.6 package in Ubuntu:
  New

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".

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tcl8.6/+bug/1935749/+subscriptions



More information about the foundations-bugs mailing list