Antlr.Runtime.BitSet.ToString C# (CSharp) Method

ToString() public method

public ToString ( string tokenNames ) : string
tokenNames string
return string
        public string ToString( string[] tokenNames )
        {
            StringBuilder buf = new StringBuilder();
            string separator = ",";
            bool havePrintedAnElement = false;
            buf.Append( '{' );

            for ( int i = 0; i < ( _bits.Length << LOG_BITS ); i++ )
            {
                if ( Member( i ) )
                {
                    if ( i > 0 && havePrintedAnElement )
                    {
                        buf.Append( separator );
                    }
                    if ( tokenNames != null )
                    {
                        buf.Append( tokenNames[i] );
                    }
                    else
                    {
                        buf.Append( i );
                    }
                    havePrintedAnElement = true;
                }
            }
            buf.Append( '}' );
            return buf.ToString();
        }

Same methods

BitSet::ToString ( ) : string