using System.Collections.Generic;
internal ref struct CharSpanSplitter
public CharSpanSplitter(ReadOnlySpan<char> value, char separator)
this.__unspeakable_value = value;
this.__unspeakable_separator = separator;
private ReadOnlySpan<char> __unspeakable_value;
private char __unspeakable_separator;
public ReadOnlySpan<char> Current { get; private set; }
if (__unspeakable_value == ReadOnlySpan<char>.Empty)
var index = __unspeakable_value.IndexOf(__unspeakable_separator);
Current = __unspeakable_value;
__unspeakable_value = ReadOnlySpan<char>.Empty;
Current = __unspeakable_value[..index];
__unspeakable_value = __unspeakable_value[(index + 1)..];
public static void Main()
Console.WriteLine("Hello World");