StringsThe LEDA data type string is a more convenient way to store and handle strings than char*. All intuitive string operations are implemented.Example
#include <LEDA/core/string.h>
int main() 
{
  leda::string a="thomas";
  leda::string b="christian";
  leda::string c="thomas";
  if (a==c) std::cout << "a==c\n";  
       //strings can be compared with ==
  std::cout << b(0,4) << std::endl;      
       //outputs the first five letters of b
  return 0;
}
     | 
     
      See also:
 
  |