Tx/Source/Tx.Bond/StringHelper.cs

18 строки
553 B
C#
Исходник Обычный вид История

2015-06-25 21:34:38 +03:00
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
namespace Tx.Binary
{
using System.Collections.Generic;
internal static class StringHelper
{
internal static IEnumerable<string> WholeChunks(this string str, int chunkSize)
{
for (int i = 0; i < str.Length; i += chunkSize)
{
yield return str.Length > i + chunkSize ? str.Substring(i, chunkSize) : str.Substring(i);
}
}
}
}