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
Go to list of users who liked
More than 3 years have passed since last update.
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
Register as a new user and use Qiita more conveniently
Go to list of users who liked