INNER CODE UNIT · C#

len

waf/CSharpRepl · CSharpRepl.Services/RuntimeHelper.cs:61

            var len = System.Math.Min(MaxLength, span.Length);
            System.Span<char> buffer = stackalloc char[len];
            span[..len].CopyTo(buffer);
            if (span.Length > len)
            {
                buffer[^1] = '.';
                buffer[^2] = '.';
                buffer[^3] = '.';
            }
            return new(buffer.ToString(), span.Length, originalType);
        }
    }

    public class RefStructOutput(string text)
    {
        private readonly string text = text;
        public override string ToString() => text;
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…