
#include "Util/StringUtil.H"#include "Util/Assert.H"#include <algorithm>#include <iterator>#include <vector>
Go to the source code of this file.
Defines | |
| #define | D_INDEX(i, j) ((i) + ((j)*(m+1))) |
| #define | D_INDEX(i, j) ((i) + ((j)*(m+1))) |
Functions | |
| std::string | stdLineWrap (const std::string &in, size_t linelength, const std::string &pfx, const std::string &sfx) |
| Split a string on whitespace, then wrap into a multi-line string with optional prefix and suffix. | |
| unsigned int | levenshteinDistance (const std::string &s, const std::string &t) |
| Compute the Levenshtein distance between two strings. | |
| unsigned int | damerauLevenshteinDistance (const std::string &s, const std::string &t) |
| Compute the Damerau-Levenshtein distance between two strings. | |
| std::string | camelCaseToSpaces (const std::string &s, const std::set< std::string > *acronyms) |
| Convert a CamelCase string to a string of space-separated words. | |
| std::string | trim (std::string const &str) |
| Remove whitespace from the beginning and end of the input string. | |
Definition in file StringUtil.C.
| std::string camelCaseToSpaces | ( | const std::string & | s, | |
| const std::set< std::string > * | acronyms | |||
| ) |
Convert a CamelCase string to a string of space-separated words.
| acronyms | If non-null, this set of uppercase acronyms will be used as a heuristic to find proper word boundaries. |
Definition at line 136 of file StringUtil.C.
Referenced by ModelParamBase::getNameWithSpaces().
| unsigned int damerauLevenshteinDistance | ( | const std::string & | s, | |
| const std::string & | t | |||
| ) |
Compute the Damerau-Levenshtein distance between two strings.
http://en.wikipedia.org/wiki/Damerau-Levenshtein_distance
Definition at line 96 of file StringUtil.C.
| unsigned int levenshteinDistance | ( | const std::string & | s, | |
| const std::string & | t | |||
| ) |
Compute the Levenshtein distance between two strings.
http://en.wikipedia.org/wiki/Levenshtein_distance
Definition at line 61 of file StringUtil.C.
| std::string stdLineWrap | ( | const std::string & | in, | |
| size_t | linelength, | |||
| const std::string & | pfx, | |||
| const std::string & | sfx | |||
| ) |
Split a string on whitespace, then wrap into a multi-line string with optional prefix and suffix.
Definition at line 50 of file StringUtil.C.
References lineWrap(), and split().
Referenced by parseStreamArg().
| std::string trim | ( | std::string const & | str | ) |
Remove whitespace from the beginning and end of the input string.
Definition at line 221 of file StringUtil.C.
1.6.3