[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git] / doc / string / length.rdoc
blob544bca269f55118bf552a7afff3f13e44c481aaf
1 Returns the count of characters (not bytes) in +self+:
3   'foo'.length        # => 3
4   'тест'.length       # => 4
5   'こんにちは'.length   # => 5
7 Contrast with String#bytesize:
9   'foo'.bytesize        # => 3
10   'тест'.bytesize       # => 8
11   'こんにちは'.bytesize   # => 15