Kotlin
Adventure1995
这个作者很懒,什么都没留下…
展开
-
2020-12-22
package com.example.myapplication import org.junit.Test import org.junit.Assert.* import java.io.File /** * Example local unit test, which will execute on the development machine (host). * * See [testing documentation](http://d.android.com/tools/tes.原创 2020-12-22 15:22:05 · 50 阅读 · 0 评论 -
From Baidu Wenku
package com.example.myapplication import org.junit.Test import org.junit.Assert.* import java.io.File /** * Example local unit test, which will execute on the development machine (host). * * See [testing documentation](http://d.android.com/tools/tes.原创 2020-11-10 08:54:24 · 201 阅读 · 0 评论 -
Copy Text From Other Online Areas
package com.example.myapplication import org.junit.Test import org.junit.Assert.* import java.io.File import java.io.Reader import java.nio.charset.Charset import java.util.regex.Matcher import java.util.regex.Pattern /** * Example local unit test, wh.原创 2020-11-09 18:04:59 · 63 阅读 · 0 评论 -
Kotlin Read From File
@Test fun readText() { val filename = """D:\Document\WorkRelated\2020\11\09\tmp.txt""" val file = File(filename) val contents = file.readText() println(contents) file.readLines().take(3).forEach { ...原创 2020-11-09 17:08:45 · 129 阅读 · 0 评论