Please review - 6984084 - String repeat()
jonathan.gibbons at oracle.com
Wed Aug 15 17:07:02 PDT 2012
If the repeat count is 1, the original string could be returned.
On 08/15/2012 05:00 PM, Mikael Vidstedt wrote:
> A tiny comment on the documentation of String.repeat():
> * @return a reference to this String
> Given that the method returns a brand new String it should probably
> reflect that more clearly.
> On 8/15/2012 11:41 AM, Jim Gish wrote:
>> Please review http://cr.openjdk.java.net/~jgish/6984084-StringRepeat/
>> This in response to an old RFE to add either a new constructor or a
>> method to repeat a string, such as "*".repeat(5) resutling in "*****"
>> There is nothing particularly lambda related in here other then the fact
>> that under the covers I'm using StringJoiner.
>> I'm happy with the name "repeat" but question the "addNcopies" method in
>> AbstractStringBuilder -- suggestions welcome.
>> -- Jim Gish | Consulting Member of Technical Staff | +1.781.442.0304
>> Oracle Java Platform Group | Core Libraries Team 35 Network Drive
>> Burlington, MA 01803 jim.gish at oracle.com
More information about the lambda-dev