Source/NFX.Erlang/Types/ErlBinary.cs
/// <summary>
/// Convert a byte buffer to printable binary representation (i.e. &lt;&lt;131,15,12,...>>)
/// </summary>
/// <param name="buf">Buffer to convert</param>
/// <param name="offset">Offset in the buffer</param>
/// <param name="count">Number of bytes to convert</param>
/// <param name="maxLen">Maximum allowed length of returned string. If given, and
/// resulting string exceeds this value, it'll be trimmed to this length ending
/// with "...>>"</param>
/// <returns></returns>
Convert a byte buffer to printable binary representation
Convert a byte buffer to printable binary representation
public static string ToBinaryString(byte[] buf, int offset, int count, int maxLen = 0)
    {
      return buf.ToDumpString(DumpFormat.Decimal, offset, count, maxLen: maxLen);
    }
public static string ToBinaryString ( byte [ ] buf , int offset , int count , int maxLen = 0 ) { return buf . ToDumpString ( DumpFormat . Decimal , offset , count , maxLen : maxLen ) ; }
Convert a byte buffer to printable binary representation (i.e.
Convert a byte buffer to printable binary representation ( i . e .
/*
      int n = m_Value.Length;
      System.Text.StringBuilder s = new System.Text.StringBuilder();
      s.Append("<<");
      if (n > 0) s.Append(m_Value[0]);
      for (int i = 1; i < n; i++)
          s.AppendFormat(",{0}", m_Value[i]);
      s.Append(">>");
      return s.ToString();
      */
None
buf
byte[]
Buffer to convert
Buffer to convert
offset
int
Offset in the buffer
Offset in the buffer
count
int
Number of bytes to convert
Number of bytes to convert
maxLen
int
Maximum allowed length of returned string. If given, and
resulting string exceeds this value, it'll be trimmed to this length ending
with "...>>"
Maximum allowed length of returned string . If given and resulting string exceeds this value it ' ll be trimmed to this length ending with " ... >> "