Optimize some usage of StringBuilder. This is a follow-up to 278348@main to address Darin's comments.
Pull request: https://github.com/WebKit/WebKit/pull/28141
Committed 278383@main (9e40c12adba0): <https://commits.webkit.org/278383@main> Reviewed commits have been landed. Closing PR #28141 and removing active labels.
<rdar://problem/127559022>