public CharsRef add(CharsRef prefix, CharsRef output) {assert prefix != null;assert output != null;if (prefix == NO_OUTPUT) {return output;} else if (output == NO_OUTPUT) {return prefix;} else {assert prefix.length > 0;assert output.length > 0;CharsRef result = new CharsRef(prefix.length + output.length);System.arraycopy(prefix.chars, prefix.offset, result.chars, 0, prefix.length);System.arraycopy(output.chars, output.offset, result.chars, prefix.length, output.length);result.length = prefix.length + output.length;return result;}}

public override CharsRef Add(CharsRef prefix, CharsRef output){Debug.Assert(prefix != null);Debug.Assert(output != null);if (prefix == NO_OUTPUT){return output;}else if (output == NO_OUTPUT){return prefix;}else{Debug.Assert(prefix.Length > 0);Debug.Assert(output.Length > 0);var result = new CharsRef(prefix.Length + output.Length);Array.Copy(prefix.Chars, prefix.Offset, result.Chars, 0, prefix.Length);Array.Copy(output.Chars, output.Offset, result.Chars, prefix.Length, output.Length);result.Length = prefix.Length + output.Length;return result;}}
