Correct deprecated message for trim()

Correct documentation description.
This commit is contained in:
Ilya Gorbunov
2015-04-01 23:45:06 +03:00
parent 8f01130e8e
commit cb85d335ba
+3 -3
View File
@@ -3,11 +3,11 @@ package kotlin
import java.util.NoSuchElementException
/** Returns the string with leading and trailing text matching the given string removed */
deprecated("Use removeEnclosing(text, text) or removePrefix(text).removeSuffix(text)")
deprecated("Use removeSurrounding(text, text) or removePrefix(text).removeSuffix(text)")
public fun String.trim(text: String): String = removePrefix(text).removeSuffix(text)
/** Returns the string with the prefix and postfix text trimmed */
deprecated("Use removeEnclosing(prefix, suffix) or removePrefix(prefix).removeSuffix(suffix)")
deprecated("Use removeSurrounding(prefix, suffix) or removePrefix(prefix).removeSuffix(suffix)")
public fun String.trim(prefix: String, postfix: String): String = removePrefix(prefix).removeSuffix(postfix)
/**
@@ -150,7 +150,7 @@ deprecated("Use !isNullOrEmpty() or isNullOrEmpty().not() for nullable strings."
public fun String?.isNotEmpty(): Boolean = this != null && this.length() > 0
/**
* Return `true` if this nullable string is either null or empty.
* Returns `true` if this nullable string is either null or empty.
*/
public fun String?.isNullOrEmpty(): Boolean = this == null || this.length() == 0