Well, it depends what you mean by upper case. The Inform documentation refers to title case as what I’d guess you mean…
room 1 is a room.
the codex is a thing in room 1.
crumbling trash is scenery in room 1.
instead of examining the codex:
let X1 be "[crumbling trash]" in upper case; [all caps]
let X2 be "[crumbling trash]" in title case; [1st letter caps]
say "[X1] [X2]";
Oh, man. I completely misunderstood the question. I didn’t even consider you wanted that, for some reason. Please don’t ask me why.
It’s chapter 19, section 4 of the Inform documentation, by the way. I know I got intimidated by the final chapters. It’s tough to know what to search for at first.
Basically, ‘in sentence case’ can be used to make indexed text capitalise at the beginning of a sentence (which is what you want here), as per 19.4 of the documentation. Unfortunately, an object substitution doesn’t count as indexed text. I assume you’re bracketing objects in line with Aaron Reed’s suggest to get BENT. I’d say it might just be simpler that when an object is the first word of a sentence, unbracket it after making sure you’ve definitely implemented the object. Obviously, if it’s critical that you bracket, the code I just showed does the trick just fine.
Hovel is a room. "[crumbling trash in sentence case] is here".
Some crumbling trash is a thing.
To say (O - an object) in sentence case:
let T be "[O]" in sentence case;
say T.
To say (Obj - object) in mixed case: (- print (Cap) {Obj}; -).
Hovel is a room. "[Crumbling trash in mixed case] lies everywhere."
Some crumbling trash is scenery in Hovel.
The differences from “say in sentence case” would be two:
the above doesn’t invoke the indexed text machinery,
and it preserves existing uppercase letters in the printed name.
("[empty bottles of Coke in sentence case]" would result in ‘Empty bottles of coke’, whereas “[empty bottles of Coke in mixed case]” would print ‘Empty bottles of Coke’.)