Converting to Title Case means to make the first letter of every word in a string capitalized, and all the other letters made lowercase. It can be handy if you copy an all-capital string from somewhere else but you don't like all-caps and want to convert it to title case. I couldn't find a built-in Leo command to do this.
Maybe it's there somewhere, but here's a little script to do the job. It uses the
title() method of strings. You can put it into myLeoSettings.leo as a command, button, or menu item.
"""Convert selection or body to title case."""
w = c.frame.body.wrapper
p = c.p
s = p.b
u = c.undoer
start, end = w.getSelectionRange()
use_entire = start == end # no selection, convert entire body
undoType = 'title-case-body-selection'
undoData = u.beforeChangeNodeContents(p)
if use_entire:
p.b = s.title()
else:
sel = s[start:end]
head, tail = s[:start], s[end:]
p.b = head + sel.title() + tail
c.setChanged()
p.setDirty()
u.afterChangeNodeContents(p, undoType, undoData)
c.redraw()