Initial commit

This commit is contained in:
github-classroom[bot] 2025-04-29 15:03:45 +00:00 committed by GitHub
commit b087f272b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 5345 additions and 0 deletions

View file

@ -0,0 +1,53 @@
using System.Collections;
namespace Numbers.NumberString;
/// <summary>
/// Allows to enumerate only the digits in a string
/// </summary>
/// <inheritdoc cref="IEnumerator{T}"/>
public sealed class DigitEnumerator : IEnumerator<int>
{
// TODO
// private readonly string _text;
// private int _index;
/// <summary>
/// Creates a new instance of <see cref="DigitEnumerator"/> based on the given text.
/// This will be called within <see cref="NumberString.GetEnumerator"/>.
/// </summary>
/// <param name="text">The text to iterate over (containing both letters and digits)</param>
public DigitEnumerator(string text)
{
// TODO
}
public bool MoveNext()
{
// TODO
return false;
}
public void Reset()
{
// TODO
}
public int Current
{
get
{
// TODO
return -1;
//static int GetDigit(char c) => c - '0';
}
}
object IEnumerator.Current => null!; // TODO
public void Dispose()
{
// TODO?
}
}