KT-29151 Fix the problematic pages - CharSequence.take() & String.take()

This commit is contained in:
Burak Eregar
2019-01-25 00:18:26 +00:00
committed by Ilya Gorbunov
parent 0f45e3d238
commit 991e739693
3 changed files with 15 additions and 6 deletions
@@ -455,7 +455,7 @@ public inline fun String.slice(indices: Iterable<Int>): String {
/**
* Returns a subsequence of this char sequence containing the first [n] characters from this char sequence, or the entire char sequence if this char sequence is shorter.
*
* @sample samples.collections.Collections.Transformations.take
* @sample samples.text.Strings.take
*/
public fun CharSequence.take(n: Int): CharSequence {
require(n >= 0) { "Requested character count $n is less than zero." }
@@ -465,7 +465,7 @@ public fun CharSequence.take(n: Int): CharSequence {
/**
* Returns a string containing the first [n] characters from this string, or the entire string if this string is shorter.
*
* @sample samples.collections.Collections.Transformations.take
* @sample samples.text.Strings.take
*/
public fun String.take(n: Int): String {
require(n >= 0) { "Requested character count $n is less than zero." }