capitalize/decapitalize: improve docs, add one test

This commit is contained in:
Ilya Gorbunov
2019-05-28 16:15:29 +03:00
parent af31794f60
commit a921bd04e0
2 changed files with 6 additions and 7 deletions
@@ -568,9 +568,9 @@ public actual fun String.capitalize(): String {
}
/**
* Returns a copy of this string having its first letter uppercased preferring [Character.toTitleCase] (if different from
* [Character.toUpperCase]) or by [String.toUpperCase] using [locale], or the original string, if it's empty or already
* starts with an upper case letter.
* Returns a copy of this string having its first letter titlecased preferring [Char.toTitleCase] (if different from
* [Char.toUpperCase]) or by [String.toUpperCase] using the specified [locale], or the original string,
* if it's empty or already starts with an upper case letter.
*/
@SinceKotlin("1.3")
@ExperimentalStdlibApi
@@ -603,8 +603,8 @@ public actual fun String.decapitalize(): String {
}
/**
* Returns a copy of this string having its first letter lowercased using [locale], or the original string,
* if it's empty or already starts with a lower case letter.
* Returns a copy of this string having its first letter lowercased using the specified [locale],
* or the original string, if it's empty or already starts with a lower case letter.
*/
@SinceKotlin("1.3")
@ExperimentalStdlibApi