Share via


String.ToLowerCase Method

Definition

Overloads

ToLowerCase()

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

ToLowerCase(Locale)

Converts all of the characters in this String to lower case using the rules of the given Locale.

ToLowerCase()

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

[Android.Runtime.Register("toLowerCase", "()Ljava/lang/String;", "")]
public string ToLowerCase ();
[<Android.Runtime.Register("toLowerCase", "()Ljava/lang/String;", "")>]
member this.ToLowerCase : unit -> string

Returns

the String, converted to lowercase.

Attributes

Remarks

Converts all of the characters in this String to lower case using the rules of the default locale. This is equivalent to calling toLowerCase(Locale.getDefault()).

<b>Note:</b> This method is locale sensitive, and may produce unexpected results if used for strings that are intended to be interpreted locale independently. Examples are programming language identifiers, protocol keys, and HTML tags. For instance, "TITLE".toLowerCase() in a Turkish locale returns "t\u005Cu0131tle", where '\u005Cu0131' is the LATIN SMALL LETTER DOTLESS I character. To obtain correct results for locale insensitive strings, use toLowerCase(Locale.ROOT).

Java documentation for java.lang.String.toLowerCase().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToLowerCase(Locale)

Converts all of the characters in this String to lower case using the rules of the given Locale.

[Android.Runtime.Register("toLowerCase", "(Ljava/util/Locale;)Ljava/lang/String;", "")]
public string ToLowerCase (Java.Util.Locale locale);
[<Android.Runtime.Register("toLowerCase", "(Ljava/util/Locale;)Ljava/lang/String;", "")>]
member this.ToLowerCase : Java.Util.Locale -> string

Parameters

locale
Locale

use the case transformation rules for this locale

Returns

the String, converted to lowercase.

Attributes

Remarks

Converts all of the characters in this String to lower case using the rules of the given Locale. Case mapping is based on the Unicode Standard version specified by the java.lang.Character Character class. Since case mappings are not always 1:1 char mappings, the resulting String may be a different length than the original String.

Examples of lowercase mappings are in the following table: <table class="plain"> <caption style="display:none">Lowercase mapping examples showing language code of locale, upper case, lower case, and description</caption> <thead> <tr> <th scope="col">Language Code of Locale</th> <th scope="col">Upper Case</th> <th scope="col">Lower Case</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>tr (Turkish)</td> <th scope="row" style="font-weight:normal; text-align:left">&#92;u0130</th> <td>&#92;u0069</td> <td>capital letter I with dot above -&gt; small letter i</td> </tr> <tr> <td>tr (Turkish)</td> <th scope="row" style="font-weight:normal; text-align:left">&#92;u0049</th> <td>&#92;u0131</td> <td>capital letter I -&gt; small letter dotless i </td> </tr> <tr> <td>(all)</td> <th scope="row" style="font-weight:normal; text-align:left">French Fries</th> <td>french fries</td> <td>lowercased all chars in String</td> </tr> <tr> <td>(all)</td> <th scope="row" style="font-weight:normal; text-align:left"> &Iota;&Chi;&Theta;&Upsilon;&Sigma;</th> <td>&iota;&chi;&theta;&upsilon;&sigma;</td> <td>lowercased all chars in String</td> </tr> </tbody> </table>

Added in 1.1.

Java documentation for java.lang.String.toLowerCase(java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to