سؤال

How do I change the case of the first character in a string that has multiple words? For example:

First Last

to

first last

or

The Fat Cat Is Hungry

to

the fat cat is hungry

لا يوجد حل صحيح

نصائح أخرى

toLowerCase

public String toLowerCase()

Converts all of the characters in this String to lower case using the rules of the default locale.

Returns: the String, converted to lowercase.

Next time, search the Java API first.

In java ?

result = changeCase.toLowerCase( )

Just do like that:

String result = yourstring.toLowerCase( );
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top