Jonathan Shore
04/18/2019, 12:02 PMSmallville7123
04/18/2019, 1:52 PMval A = StringBuilder(string = "")
val B = StringBuilder(content = "")
what is the difference between string
and content
, like do both do the exact same thing?Smallville7123
04/18/2019, 2:25 PMjava.lang.ClassFormatError: Duplicate method name&signature in class file FileKt
in https://pl.kotl.in/tLfGFlvkuSmallville7123
04/18/2019, 3:49 PMException in thread "main" java.lang.IndexOutOfBoundsException: start 4, end 3, s.length() 3
for https://pl.kotl.in/PEocYV7Ns fun String.padShrinkEnd(to: Int, char: Char): String {
val thisLength = this.length
val build = this.removeRange(to..thisLength).toStringBuilder()
while(build.length < thisLength) build.append(char)
return build.toString()
}
fun main() {
println("\"" + "abc".padShrinkEnd(2, ' ') + "\"")
}
Smallville7123
04/18/2019, 5:40 PMkarelpeeters
04/18/2019, 6:27 PMoperator fun invoke
on the companion but that's even uglier)karelpeeters
04/18/2019, 7:43 PMSmallville7123
04/18/2019, 7:55 PMfor
loop is faster than a forEach
expression right?Smallville7123
04/18/2019, 10:26 PMwhen
to continue to the next case even if the current case is valid
for example val x = true
val y = 1
when(x) {
true -> when(y) {
1 -> // go to else of when(x) and not else of when(y), since false of when(x) will not match true
else -> println("pass")
}
false -> println("statement")
else -> println("fail")
}
Smallville7123
04/19/2019, 9:00 AMAntanas A.
04/19/2019, 1:23 PMSmallville7123
04/19/2019, 3:59 PMSmallville7123
04/19/2019, 4:03 PMsrc/main/kotlin/main.kt
>
val src = Heirachy.Source().directory[0].direcctory[0].directory[0].file[0].sourceCode
val file = Heirachy.Source().directory[0].directory[0].directory[0].file[0].fileName
println("source code for $file is\n$src\n")
Slackbot
04/19/2019, 4:25 PMSmallville7123
04/19/2019, 4:40 PMSebastian Krajewski
04/19/2019, 6:57 PMCause: Label wasn't found during iterating through instructions
Element is unknownThe root cause was thrown at: LabelNormalizationMethodTransformer.kt:148
Pablo Schmid
04/19/2019, 11:08 PMliminal
04/20/2019, 2:35 AMmorcerfdumas
04/20/2019, 7:54 AMelse
branch?stevecstian
04/21/2019, 8:10 AMSmallville7123
04/21/2019, 1:24 PMval
or var
and without creating a function via fun
the closest i can get is a lambda expression { println("this is inside lambda") }
but i am unable to assign a lable to itSlackbot
04/21/2019, 3:30 PMShawn A
04/21/2019, 4:16 PMstevecstian
04/21/2019, 4:18 PMSlackbot
04/21/2019, 7:54 PMaidan
04/22/2019, 9:21 AMait
04/22/2019, 11:01 AMbjonnh
04/22/2019, 5:12 PMAndrew Gazelka
04/22/2019, 7:15 PMSequence
does not implement Iterable
? It is annoying to have to have two extension functions to support things which have a forEach
method.Daniel
04/22/2019, 7:34 PMOperands : List<Operand>
and I want to spread it with *operands
instead of *operands.toTypedArray()
which I have to use nowDaniel
04/22/2019, 7:34 PMOperands : List<Operand>
and I want to spread it with *operands
instead of *operands.toTypedArray()
which I have to use nowRuckus
04/22/2019, 7:54 PMDaniel
04/22/2019, 8:08 PM