Logo Search packages:      
Sourcecode: lttoolbox version File versions  Download package

void Alphabet::getSymbol ( string &  result,
int const   symbol,
bool  uppercase = false 
) const

Concat a symbol in the string that is passed by reference.

Parameters:
result string where the symbol should be concatenated
symbol code of the symbol
uppercase true if we want an uppercase symbol

Definition at line 212 of file Alphabet.C.

References slexicinv.

Referenced by State::filterFinals(), and State::filterFinalsSAO().

{
  if(symbol == 0)
  {
    return;
  }
  
  if(!uppercase)
  {
    if(symbol < 256)
    {
      result += char(symbol);
    }
    else
    {
      result.append(slexicinv[symbol]);
    }
  }
  else if(symbol < 256)
  {
    result += char(toupper(symbol));
  }
  else
  {
    result.append(slexicinv[symbol]);
  }
}


Generated by  Doxygen 1.6.0   Back to index