Corrija o espaçamento

Published by SyntaxGardener in

Foram adicionados espaços extras a uma frase. Retorne a frase corrigida com exatamente um espaço entre as palavras e sem espaços no início nem no fim.

Exemplos

Program.CorrectSpacing("The film   starts       at      midnight. ") ➞ "The film starts at midnight."

Program.CorrectSpacing("The     waves were crashing  on the     shore.   ") ➞ "The waves were crashing on the shore."

Program.CorrectSpacing(" Always look on    the bright   side of  life.") ➞ "Always look on the bright side of life."

Notas

As entradas usam caracteres de espaço comuns.