summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/string/bytesize.rdoc20
1 files changed, 12 insertions, 8 deletions
@@ -1,11 +1,15 @@
-Returns the count of bytes (not characters) in +self+:
- 'foo'.bytesize # => 3
- 'тест'.bytesize # => 8
- 'こんにちは'.bytesize # => 15
-Contrast with String#length:
- 'foo'.length # => 3
- 'тест'.length # => 4
- 'こんにちは'.length # => 5