How can i change the format of a word plz?

For this word : ''transition"

I need to have 3 variantes of this word "transition :slight_smile:

  1. transition (everything on lowercase)
  2. Transition (Juste the first letter on uppercase)
  3. TRANSITION (everything on uppercase letter)

Need to know how to write the sentence plz

Thank you

Hi,

Hope the following expressions help you.

Let’s say yourString =“transition”

transition :

yourString.ToLower()

Transition :

System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(yourString)

TRANSITION :

yourString.ToUpper()

Regards,

5 Likes

This is it ! Thank you my friend ! :wink:

1 Like

oh sorry one thing again, i think it doesnt work with a long sentence :

VEUILLEZ SAISIR LE FILTRE SOUHAITÉ SVP

Hi,

Can you try the following?

System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase("VEUILLEZ SAISIR LE FILTRE SOUHAITÉ SVP".ToLower())

This returns Veuillez Saisir Le Filtre Souhaité Svp

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.