[ruby-core:64064] [ruby-trunk - Feature #9650] [Feedback] String#size versus String#length

From: nobu@...
Date: 2014-07-26 17:09:31 UTC
List: ruby-core #64064
Issue #9650 has been updated by Nobuyoshi Nakada.

Status changed from Open to Feedback

Why `size` in bytes and `length` in chars, not vice versa?

----------------------------------------
Feature #9650: String#size versus String#length
https://bugs.ruby-lang.org/issues/9650#change-48074

* Author: S辿bastien Durand
* Status: Feedback
* Priority: Low
* Assignee: 
* Category: 
* Target version: Next Major
----------------------------------------
Hi guys !

A quick idea for the next major version :

String#size => bytes length
String#length => chars length 

Could this be a good move or too much BC break ?



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next