Exemple #1
0
        public unsafe void Write(StringSpan word, ref StringSpan buffer)
        {
            var len = word.Length;
            var buf = buffer.Pointer;

            if (_nonFirst)
            {
                *buf++ = '_';
                ++len;
            }
            else
            {
                _nonFirst = true;
            }

            var p = word.Pointer;

            *   buf++ = char.ToLower(*p);
            var size  = sizeof(char) * (word.Length - 1);

            Buffer.MemoryCopy(p + 1, buf, size, size);
            buffer = buffer.Slice(len);
        }