mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
13 lines
297 B
Plaintext
13 lines
297 B
Plaintext
Returns the count of bytes in +self+.
|
|
|
|
Note that the byte count may be different from the character count (returned by #size):
|
|
|
|
s = 'foo'
|
|
s.bytesize # => 3
|
|
s.size # => 3
|
|
s = 'こんにちは'
|
|
s.bytesize # => 15
|
|
s.size # => 5
|
|
|
|
Related: see {Querying}[rdoc-ref:String@Querying].
|