I do not think there is an existing method.
Here's an implementation that solves your problem:
input := 'hello how are you today'. output := String streamContents: [ :stream | | capitalize | capitalize := false. input do: [ :char | char = Character space ifTrue: [ capitalize := true ] ifFalse: [ stream nextPut: (capitalize ifTrue: [ char asUppercase ] ifFalse: [ char ]). capitalize := false ] ] ].
Edit: notice that compared to Frank's decision, it is longer, but it does not interrupt for empty input and does not create a new line instance for each step, since it passes streams through the input, which is more efficient (if you have large lines).
source share