stringManipulation.cpp File Reference

Source file defining routines for working with strings. More...

#include <ctype.h>
#include <dlrUtilities/stringManipulation.h>

Include dependency graph for stringManipulation.cpp:

Go to the source code of this file.


Namespaces

namespace  dlr::utilities
 This namespace contains general utility functions and classes for string manipluation, program option parsing, working with time and filenames, and a few other odds and ends.

Functions

std::string dlr::utilities::cleanString (const std::string &inputString, const std::string &specialCharacters="\"~#$&*()\\|[]{};'`<>/?", char quoteCharacter='\\', bool alreadyQuoted=false)
 This function takes an input string and returns a string in which all special shell characters have been escaped.
std::string dlr::utilities::joinString (const std::vector< std::string > &inputStringVector, const std::string &separator="")
 This function returns a single string comprising copies of all of the strings in inputStringVector, interposed by the copies of separator.
std::string dlr::utilities::lowerCaseString (const std::string &inputString)
 This function returns a copy of the input argument in which every uppercase character has been replaced with its lowercase equivalent.
std::string dlr::utilities::replaceString (const std::string &inputString, const std::string &target, const std::string &replacement)
 This function copies a string, replacing non-overlapping occurrences of a target string with the specified replacement.
std::vector< std::string > dlr::utilities::splitString (const std::string &inputString, const std::string &delimiter, bool includeNullStrings=false, size_t maxSplit=0)
 This function divides inputString around instances of delimiter.
std::string dlr::utilities::stripString (const std::string &inputString, const std::string &whiteSpace=" \t\n")
 This function removes whitespace from the beginning and end of a string.
std::string dlr::utilities::upperCaseString (const std::string &inputString)
 This function returns a copy of the input argument in which every lowercase character has been replaced with its uppercase equivalent.
std::string dlr::utilities::wrapString (const std::string &inputString, const std::string &fillPrefix="", size_t width=78, const std::string &whitespace=" \t\n", const std::string &eolString="\n")
 This function returns a copy of the input argument in which end-of-line markers have been inserted to wrap the string at a specified line length.


Detailed Description

Source file defining routines for working with strings.

Copyright (C) 2003-2004, David LaRose, dlr@cs.cmu.edu See accompanying file, LICENSE.TXT, for details.

Revision
975
Date
2007-12-30 01:57:17 -0500 (Sun, 30 Dec 2007)

Definition in file stringManipulation.cpp.


Generated on Wed Nov 25 11:07:10 2009 for dlrUtilities Utility Library by  doxygen 1.5.8