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?

kotlin 文字数の取得方法

Posted at

kotlin 文字数の取得方法です。

.kt

val text = "Android"
val text2 = ""

val textLength = text.length
val textLength2 = text2.length
    
println(textLength)
println(textLength2)

結果 
7
0
String.lengthで取得することが可能です。

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?