LoginSignup
2
0

More than 5 years have passed since last update.

[Ruby]lengthについて

Posted at

lengthメッソドを勉強したのでメモっとく

文字オブジェクトの文字数を知りたい場合

文字オブジェクト.length
=>文字数

配列オブジェクトに格納された要素の数を知りたい場合

配列オブジェクト.length
=>格納された要素の数

以上

2
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
2
0