Replaced sure() invocations with '!!' operator in js.libraries/src/core.
This commit is contained in:
@@ -34,20 +34,20 @@ native public fun String.equalsIgnoreCase(anotherString: String) : Boolean = (th
|
||||
|
||||
native public fun String.hashCode() : Int = (this as java.lang.String).hashCode()
|
||||
|
||||
native public fun String.replace(oldChar: Char, newChar : Char) : String = (this as java.lang.String).replace(oldChar, newChar).sure()
|
||||
native public fun String.replace(oldChar: Char, newChar : Char) : String = (this as java.lang.String).replace(oldChar, newChar)!!
|
||||
|
||||
native public fun String.replaceAll(regex: String, replacement : String) : String = (this as java.lang.String).replaceAll(regex, replacement).sure()
|
||||
native public fun String.replaceAll(regex: String, replacement : String) : String = (this as java.lang.String).replaceAll(regex, replacement)!!
|
||||
|
||||
|
||||
native public fun String.length() : Int = (this as java.lang.String).length()
|
||||
|
||||
native public fun String.getBytes() : ByteArray = (this as java.lang.String).getBytes().sure()
|
||||
native public fun String.getBytes() : ByteArray = (this as java.lang.String).getBytes()!!
|
||||
|
||||
native public fun String.toCharArray() : CharArray = (this as java.lang.String).toCharArray().sure()
|
||||
native public fun String.toCharArray() : CharArray = (this as java.lang.String).toCharArray()!!
|
||||
|
||||
native public fun String.toCharList(): List<Char> = toCharArray().toList()
|
||||
|
||||
native public fun String.format(format : String, vararg args : Any?) : String = java.lang.String.format(format, args).sure()
|
||||
native public fun String.format(format : String, vararg args : Any?) : String = java.lang.String.format(format, args)!!
|
||||
|
||||
|
||||
native public fun String.split(ch : Char) : Array<String> = (this as java.lang.String).split(java.util.regex.Pattern.quote(ch.toString())) as Array<String>
|
||||
@@ -84,48 +84,48 @@ native public fun String(stringBuffer : java.lang.StringBuffer) : String = java.
|
||||
|
||||
native public fun String(stringBuilder : java.lang.StringBuilder) : String = java.lang.String(stringBuilder) as String
|
||||
|
||||
native public fun String.replaceFirst(regex : String, replacement : String) : String = (this as java.lang.String).replaceFirst(regex, replacement).sure()
|
||||
native public fun String.replaceFirst(regex : String, replacement : String) : String = (this as java.lang.String).replaceFirst(regex, replacement)!!
|
||||
|
||||
|
||||
native public fun String.split(regex : String, limit : Int) : Array<String?> = (this as java.lang.String).split(regex, limit).sure()
|
||||
native public fun String.split(regex : String, limit : Int) : Array<String?> = (this as java.lang.String).split(regex, limit)!!
|
||||
|
||||
native public fun String.codePointAt(index : Int) : Int = (this as java.lang.String).codePointAt(index).sure()
|
||||
native public fun String.codePointAt(index : Int) : Int = (this as java.lang.String).codePointAt(index)!!
|
||||
|
||||
native public fun String.codePointBefore(index : Int) : Int = (this as java.lang.String).codePointBefore(index).sure()
|
||||
native public fun String.codePointBefore(index : Int) : Int = (this as java.lang.String).codePointBefore(index)!!
|
||||
|
||||
native public fun String.codePointCount(beginIndex : Int, endIndex : Int) : Int = (this as java.lang.String).codePointCount(beginIndex, endIndex)
|
||||
|
||||
native public fun String.compareToIgnoreCase(str : String) : Int = (this as java.lang.String).compareToIgnoreCase(str).sure()
|
||||
native public fun String.compareToIgnoreCase(str : String) : Int = (this as java.lang.String).compareToIgnoreCase(str)!!
|
||||
|
||||
|
||||
native public fun String.contentEquals(cs : CharSequence) : Boolean = (this as java.lang.String).contentEquals(cs).sure()
|
||||
native public fun String.contentEquals(cs : CharSequence) : Boolean = (this as java.lang.String).contentEquals(cs)!!
|
||||
|
||||
native public fun String.contentEquals(sb : StringBuffer) : Boolean = (this as java.lang.String).contentEquals(sb).sure()
|
||||
native public fun String.contentEquals(sb : StringBuffer) : Boolean = (this as java.lang.String).contentEquals(sb)!!
|
||||
|
||||
native public fun String.getBytes(charset : java.nio.charset.Charset) : ByteArray = (this as java.lang.String).getBytes(charset).sure()
|
||||
native public fun String.getBytes(charset : java.nio.charset.Charset) : ByteArray = (this as java.lang.String).getBytes(charset)!!
|
||||
|
||||
native public fun String.getBytes(charsetName : String) : ByteArray = (this as java.lang.String).getBytes(charsetName).sure()
|
||||
native public fun String.getBytes(charsetName : String) : ByteArray = (this as java.lang.String).getBytes(charsetName)!!
|
||||
|
||||
native public fun String.getChars(srcBegin : Int, srcEnd : Int, dst : CharArray, dstBegin : Int) : Tuple0 = (this as java.lang.String).getChars(srcBegin, srcEnd, dst, dstBegin).sure()
|
||||
native public fun String.getChars(srcBegin : Int, srcEnd : Int, dst : CharArray, dstBegin : Int) : Tuple0 = (this as java.lang.String).getChars(srcBegin, srcEnd, dst, dstBegin)!!
|
||||
|
||||
native public fun String.intern() : String = (this as java.lang.String).intern().sure()
|
||||
native public fun String.intern() : String = (this as java.lang.String).intern()!!
|
||||
|
||||
native public fun String.isEmpty() : Boolean = (this as java.lang.String).isEmpty().sure()
|
||||
native public fun String.isEmpty() : Boolean = (this as java.lang.String).isEmpty()!!
|
||||
|
||||
|
||||
native public fun String.offsetByCodePoints(index : Int, codePointOffset : Int) : Int = (this as java.lang.String).offsetByCodePoints(index, codePointOffset).sure()
|
||||
native public fun String.offsetByCodePoints(index : Int, codePointOffset : Int) : Int = (this as java.lang.String).offsetByCodePoints(index, codePointOffset)!!
|
||||
|
||||
native public fun String.regionMatches(ignoreCase : Boolean, toffset : Int, other : String, ooffset : Int, len : Int) : Boolean = (this as java.lang.String).regionMatches(ignoreCase, toffset, other, ooffset, len).sure()
|
||||
native public fun String.regionMatches(ignoreCase : Boolean, toffset : Int, other : String, ooffset : Int, len : Int) : Boolean = (this as java.lang.String).regionMatches(ignoreCase, toffset, other, ooffset, len)!!
|
||||
|
||||
native public fun String.regionMatches(toffset : Int, other : String, ooffset : Int, len : Int) : Boolean = (this as java.lang.String).regionMatches(toffset, other, ooffset, len).sure()
|
||||
native public fun String.regionMatches(toffset : Int, other : String, ooffset : Int, len : Int) : Boolean = (this as java.lang.String).regionMatches(toffset, other, ooffset, len)!!
|
||||
|
||||
native public fun String.replace(target : CharSequence, replacement : CharSequence) : String = (this as java.lang.String).replace(target, replacement).sure()
|
||||
native public fun String.replace(target : CharSequence, replacement : CharSequence) : String = (this as java.lang.String).replace(target, replacement)!!
|
||||
|
||||
native public fun String.subSequence(beginIndex : Int, endIndex : Int) : CharSequence = (this as java.lang.String).subSequence(beginIndex, endIndex).sure()
|
||||
native public fun String.subSequence(beginIndex : Int, endIndex : Int) : CharSequence = (this as java.lang.String).subSequence(beginIndex, endIndex)!!
|
||||
|
||||
native public fun String.toLowerCase(locale : java.util.Locale) : String = (this as java.lang.String).toLowerCase(locale).sure()
|
||||
native public fun String.toLowerCase(locale : java.util.Locale) : String = (this as java.lang.String).toLowerCase(locale)!!
|
||||
|
||||
native public fun String.toUpperCase(locale : java.util.Locale) : String = (this as java.lang.String).toUpperCase(locale).sure()
|
||||
native public fun String.toUpperCase(locale : java.util.Locale) : String = (this as java.lang.String).toUpperCase(locale)!!
|
||||
|
||||
|
||||
native public fun CharSequence.charAt(index : Int) : Char = (this as java.lang.CharSequence).charAt(index)
|
||||
@@ -140,21 +140,21 @@ native public fun CharSequence.toString() : String? = (this as java.lang.CharSeq
|
||||
|
||||
native public fun String.toByteArray(encoding: String?=null):ByteArray {
|
||||
if(encoding==null) {
|
||||
return (this as java.lang.String).getBytes().sure()
|
||||
return (this as java.lang.String).getBytes()!!
|
||||
} else {
|
||||
return (this as java.lang.String).getBytes(encoding).sure()
|
||||
return (this as java.lang.String).getBytes(encoding)!!
|
||||
}
|
||||
}
|
||||
native public fun String.toByteArray(encoding: java.nio.charset.Charset):ByteArray = (this as java.lang.String).getBytes(encoding).sure()
|
||||
native public fun String.toByteArray(encoding: java.nio.charset.Charset):ByteArray = (this as java.lang.String).getBytes(encoding)!!
|
||||
|
||||
native public fun String.toBoolean() : Boolean = java.lang.Boolean.parseBoolean(this).sure()
|
||||
native public fun String.toShort() : Short = java.lang.Short.parseShort(this).sure()
|
||||
native public fun String.toInt() : Int = java.lang.Integer.parseInt(this).sure()
|
||||
native public fun String.toLong() : Long = java.lang.Long.parseLong(this).sure()
|
||||
native public fun String.toFloat() : Float = java.lang.Float.parseFloat(this).sure()
|
||||
native public fun String.toDouble() : Double = java.lang.Double.parseDouble(this).sure()
|
||||
native public fun String.toBoolean() : Boolean = java.lang.Boolean.parseBoolean(this)!!
|
||||
native public fun String.toShort() : Short = java.lang.Short.parseShort(this)!!
|
||||
native public fun String.toInt() : Int = java.lang.Integer.parseInt(this)!!
|
||||
native public fun String.toLong() : Long = java.lang.Long.parseLong(this)!!
|
||||
native public fun String.toFloat() : Float = java.lang.Float.parseFloat(this)!!
|
||||
native public fun String.toDouble() : Double = java.lang.Double.parseDouble(this)!!
|
||||
|
||||
native public fun String.toRegex(flags: Int=0): java.util.regex.Pattern {
|
||||
return java.util.regex.Pattern.compile(this, flags).sure()
|
||||
return java.util.regex.Pattern.compile(this, flags)!!
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user