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:
Ilya Gorbunov
2015-04-14 21:39:41 +03:00
parent ae13359adc
commit 7a51123d26
2 changed files with 7 additions and 13 deletions
+5 -10
View File
@@ -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
/*
+2 -3
View File
@@ -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.