beef

Results 128 comments of beef

Checking file extensions: ```kotlin val extensions = listOf("txt","exe") val file = File(...) file.extension in extensions val fileName = "foo.bar" fileName.substringAfterLast('.', "") in extensions ``` Parsing a file: I do not...

nicer to look: `O(n)` contains in hashset, toLowerCase for ignorecase: `O(1)`

A [quick benchmark](https://github.com/Enteerman/Pull_3577) suggests otherwise.

> benchmark is rigged @cookiedragon234 how so?

Kotlin uses [this benchmark plugin](https://github.com/JetBrains/kotlin/blob/df1719c64ca11964fcd675e9c208454df6c58d50/benchmarks/build.gradle.kts#L18), [ASM](https://gitlab.ow2.org/asm/asm/-/tree/master/benchmarks) uses JMH, which is what kotlinx.benchmark(the plugin i'm using) under the hood, doubts?

ok, sorry that I wasted your time when my benchmark is rigged and your tests are perfectly fine. I know your intentions now. I will not fight this when you...

What? I didn't accuse you of not respecting my opinion, where are you getting this from? Now since you asked why they show different results, initializing a file takes time....

> You use startsWith instead of ends I have fixed it but the result should be the same, starts or ends 🤷‍♂️ > can only be used for checking file...

YouTrack: https://youtrack.jetbrains.com/issue/KT-40891

https://stackoverflow.com/questions/37105012/execute-jar-file-as-administrator-in-windows