Algorithmic Solutions > LEDA > LEDA Guide > Simple, Basic, and Advanced Data Types > Simple Data Types > Strings


The LEDA data type string is a more convenient way to store and handle strings than char*. All intuitive string operations are implemented.


#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:

Manual Page Strings



Please send any suggestions, comments or questions to
© Copyright 2001-2003, Algorithmic Solutions Software GmbH