/// <summary> /// Returns true if the primitive represents infinity. /// </summary> /// <returns>True if this primitive is infinity; false otherwise.</returns> public unsafe bool IsInfinity() { var ptr = m_Stream.GetBufferPtr <byte>(m_Handle); var len = *(int *)ptr; var chars = (char *)(ptr + sizeof(int)); if (Convert.IsSigned(chars, len)) { chars++; len--; } return(Convert.MatchesInfinity(chars, len)); }
/// <summary> /// Gets the number of characters in the <see cref="SerializedStringView"/>. /// </summary> /// <returns>The number of characters in the string.</returns> public unsafe int Length() { return(*m_Stream.GetBufferPtr <int>(m_Handle)); }