public string BuildString() { End(); var result = NS2Bridge.CreateString(_jwtLength, _jwt, (destination, state) => { NS2Bridge.Latin1ToUtf16(state.AsSpan(0, _jwtLength), destination); }); return(result); }
public bool TryBuildTo(Span <char> destination, out int charsWritten) { End(); if (destination.Length < _jwtLength) { charsWritten = 0; return(false); } NS2Bridge.Latin1ToUtf16(_jwt.AsSpan(0, _jwtLength), destination); charsWritten = _jwtLength; return(true); }