Conjecture::StrManip Class Reference

#include <StrManip.h>

Inheritance diagram for Conjecture::StrManip:

Conjecture::Root List of all members.

Detailed Description

Various string manipulation routines.

****************************************************************

This class will almost certainly be restructured and incorporated into a cleaner design - just a placeholder for useful string-related methods for now.


Static Public Member Functions

static void MatchStrings (const std::string &str1, const std::string &str2, std::string &outstr1, std::string &outstr2, char insert= '_')
static std::string MergeStrings (const std::string &str1, const std::string &str2, const std::string &indent=" ")
static void Test (int argc=0, const char *argv[]=NULL)


Member Function Documentation

static void Conjecture::StrManip::MatchStrings const std::string &  str1,
const std::string &  str2,
std::string &  outstr1,
std::string &  outstr2,
char  insert = '_'
[static]
 

Perform optimal string matching between two strings.

Parameters:
str1 out parameter - string will be modified to provide better alignment
str2 out parameter - string will be modified to provide better alignment
This method takes two strings and determines where to insert "spaces" within each so as to maximize the amount of character-to-character matching between them.

static std::string Conjecture::StrManip::MergeStrings const std::string &  str1,
const std::string &  str2,
const std::string &  indent = " "
[static]
 

Merge two multi-line strings into a single string.

Each line of the strings are concatenated with 'indent' as filler. This produces readable results only if at least the first input string has fixed-length strings.

FUTURE FIX: This may be moved to a string-related class.


The documentation for this class was generated from the following files:
Generated on Thu Jun 15 19:56:12 2006 for Conjecture by  doxygen 1.4.6