1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-23 00:18:47 +00:00

🛠 Resolve RCS1277 violation

This commit is contained in:
Oliver Booth 2020-04-19 14:17:33 +01:00
parent 4c30c8228b
commit 31850220cc
No known key found for this signature in database
GPG Key ID: 0D7F2EF1C8D2B9C0

View File

@ -204,11 +204,16 @@
throw new ArgumentNullException(nameof(str));
}
return SplitInternal();
IEnumerable<string> SplitInternal()
{
for (var i = 0; i < str.Length; i += chunkSize)
{
yield return str.Substring(i, Math.Min(chunkSize, str.Length - i));
}
}
}
/// <summary>
/// Converts a <see cref="string"/> to a <see cref="SecureString"/>.