repo.or.cz
/
ruby.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git]
/
doc
/
string
/
length.rdoc
blob
544bca269f55118bf552a7afff3f13e44c481aaf
1
Returns the count of characters (not bytes) in +self+:
2
3
'foo'.length # => 3
4
'тест'.length # => 4
5
'こんにちは'.length # => 5
6
7
Contrast with String#bytesize:
8
9
'foo'.bytesize # => 3
10
'тест'.bytesize # => 8
11
'こんにちは'.bytesize # => 15
12