返回顶部

收藏

length and size methods both return an integer indicating how many characters a string holds.

更多
title = String.new # => ''
title = String.new( 'Much Ado about Nothing' )

title = String.new # => ''
title.empty? # => false
title.length # => 22

标签:Ruby,String

收藏

0人收藏

支持

0

反对

0

发表评论