blob: 5b302380b59fdb408dd1f7c778fa496a203c997e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Returns the count of characters (not bytes) in +self+:
'foo'.length # => 3
'тест'.length # => 4
'こんにちは'.length # => 5
Contrast with String#bytesize:
'foo'.bytesize # => 3
'тест'.bytesize # => 8
'こんにちは'.bytesize # => 15
Related: see {Querying}[rdoc-ref:String@Querying].
|