summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurdetteLamar <[email protected]>2025-06-21 11:58:50 -0500
committerPeter Zhu <[email protected]>2025-06-24 02:28:05 +0900
commitdb6f397987f4e400f0146212aa888df781ee7997 ()
tree7c33bd76ae4f5471e6ee752fb3e785e04ff9221d
parentb1ce569ffcb64a0faef6bf588ee04874892feb6f (diff)
Tweaks for String#bytesize
-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