From 23f0078eccaff9c6795d0f05cf031f5f2386be18 Mon Sep 17 00:00:00 2001 From: Vance Morrison Date: Thu, 24 May 2018 11:01:46 -0700 Subject: [PATCH] Rename EnumerateCHunks -> GetChunks per API review feedback. --- src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs b/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs index 58af600..bbdfb39 100644 --- a/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs +++ b/src/System.Private.CoreLib/shared/System/Text/StringBuilder.cs @@ -558,11 +558,11 @@ namespace System.Text } /// - /// EnumerateChunks returns ChunkEnumerator that follows the IEnumerable pattern and + /// GetChunks returns ChunkEnumerator that follows the IEnumerable pattern and /// thus can be used in a C# 'foreach' statements to retreive the data in the StringBuilder /// as chunks (ReadOnlyMemory) of characters. An example use is: /// - /// foreach (ReadOnlyMemory chunk in sb.EnumerateChunks()) + /// foreach (ReadOnlyMemory chunk in sb.GetChunks()) /// foreach(char c in chunk.Span) /// { /* operation on c } /// @@ -577,18 +577,18 @@ namespace System.Text /// compared to the fetching of the character, so create a local variable for the SPAN /// if you need to use it in a nested for statement. For example /// - /// foreach (ReadOnlyMemory chunk in sb.EnumerateChunks()) + /// foreach (ReadOnlyMemory chunk in sb.GetChunks()) /// { /// var span = chunk.Span; /// for(int i = 0; i < span.Length; i++) /// { /* operation on span[i] */ } /// } /// - public ChunkEnumerator EnumerateChunks() => new ChunkEnumerator(this); + public ChunkEnumerator GetChunks() => new ChunkEnumerator(this); /// /// ChunkEnumerator supports both the IEnumerable and IEnumerator pattern so foreach - /// works (see EnumerateChunks). It needs to be public (so the compiler can use it + /// works (see GetChunks). It needs to be public (so the compiler can use it /// when building a foreach statement) but users typically don't use it explicitly. /// (which is why it is a nested type). /// -- 2.7.4