Make native* methods internal in stdlib.js as it was intended.
They are not checked with stdlib-validator, so it is possible.
This commit is contained in:
@@ -7,20 +7,16 @@ native public fun String.toUpperCase() : String = noImpl
|
||||
|
||||
native public fun String.toLowerCase() : String = noImpl
|
||||
|
||||
// TODO: make internal
|
||||
native("indexOf")
|
||||
public fun String.nativeIndexOf(str : String, fromIndex : Int) : Int = noImpl
|
||||
internal fun String.nativeIndexOf(str : String, fromIndex : Int) : Int = noImpl
|
||||
|
||||
// TODO: make internal
|
||||
native("lastIndexOf")
|
||||
public fun String.nativeLastIndexOf(str : String, fromIndex : Int) : Int = noImpl
|
||||
internal fun String.nativeLastIndexOf(str : String, fromIndex : Int) : Int = noImpl
|
||||
|
||||
// TODO: make internal
|
||||
native("startsWith")
|
||||
public fun String.nativeStartsWith(s: String, position: Int): Boolean = noImpl
|
||||
// TODO: make internal
|
||||
internal fun String.nativeStartsWith(s: String, position: Int): Boolean = noImpl
|
||||
native("endsWith")
|
||||
public fun String.nativeEndsWith(s: String): Boolean = noImpl
|
||||
internal fun String.nativeEndsWith(s: String): Boolean = noImpl
|
||||
|
||||
deprecated("Use split(Regex) instead.")
|
||||
library("splitString")
|
||||
@@ -57,9 +53,8 @@ public fun CharSequence.isEmpty(): Boolean = noImpl
|
||||
|
||||
|
||||
|
||||
// TODO: internal
|
||||
native("replace")
|
||||
public fun String.nativeReplace(pattern: RegExp, replacement: String): String = noImpl
|
||||
internal fun String.nativeReplace(pattern: RegExp, replacement: String): String = noImpl
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -3,9 +3,8 @@ package kotlin
|
||||
import kotlin.text.Regex
|
||||
import kotlin.text.js.RegExp
|
||||
|
||||
// TODO: make internal
|
||||
public inline fun String.nativeIndexOf(ch : Char, fromIndex : Int) : Int = nativeIndexOf(ch.toString(), fromIndex)
|
||||
public inline fun String.nativeLastIndexOf(ch : Char, fromIndex : Int) : Int = nativeLastIndexOf(ch.toString(), fromIndex)
|
||||
internal inline fun String.nativeIndexOf(ch : Char, fromIndex : Int) : Int = nativeIndexOf(ch.toString(), fromIndex)
|
||||
internal inline fun String.nativeLastIndexOf(ch : Char, fromIndex : Int) : Int = nativeLastIndexOf(ch.toString(), fromIndex)
|
||||
|
||||
/**
|
||||
* Returns `true` if this string starts with the specified prefix.
|
||||
|
||||
Reference in New Issue
Block a user