#2896 Str.toDisplayName() and Capitalised Words

SlimerDude Wed 15 Nov 2023

Hi, I just noticed this:

Fantom Shell v1.0.79 ('?' for help)
fansh> "Text with some Capitalised Words".toDisplayName
Text with some  Capitalised  Words  // <-- double spaces

where I would have expected:

Text with some Capitalised Words    // <-- all single spaces

I know that technically toDisplayName() is doing exactly as advertised in the docs, and I know I shouldn't be using it on on string that already is a display name, but still... sometimes it's nice to have your cake and eat it! :)

Gary Mon 27 Nov 2023

I can verify it on my end. It appears an extra space is added just before the word with a capitalized letter.

Login or Signup to reply.