0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Android/Kotlin】n番目からm番目の文字を取得する方法

Posted at
hoge.kotlin
var fuga = "20190127"
var length = fuga.length
var text = fuga.substring(length-2,length)//6から8まで抽出
→27
var text2 = fuga.substring(4,8)//4から8まで抽出
→0127
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?