Functions for dealing with strings.
|
static bool | beginsWith (string wholeString, string beginning) |
| Returns true if wholeString begins with beginning .
|
|
static bool | endsWith (string wholeString, string ending) |
| Returns true if wholeString ends with ending .
|
|
static string | substrAfter (string wholeString, string beginning) |
| Returns the substring of wholeString that follows beginning , or an empty string if wholeString does not begin with beginning .
|
|
static string | substrBefore (string wholeString, string ending) |
| Returns the substring of wholeString that precedes ending , or an empty string if wholeString does not end with ending .
|
|
static string | replaceAll (string wholeString, char originalChar, char replacementChar) |
| Returns a string constructed by replacing all instances of originalChar with replacementChar in wholeString .
|
|
static size_t | replaceAll (string &wholeString, string originalSubstring, string replacementSubstring) |
| Replaces all instances of originalSubstring with replacementSubstring in wholeString.
|
|
static vector< string > | split (const string &wholeString, char delimiter) |
| Splits wholeString into parts, as separated by delimiter.
|
|
static string | join (vector< string > partialStrings, char delimiter) |
| Combines partialStrings, separated by delimiter, into one string.
|
|
static string | prefixSymbolName (string symbolName, string moduleKey) |
| Returns a string that starts with moduleKey and ends with symbolName.
|
|
static bool | isValidCharInIdentifier (char ch) |
| Check whether a character is valid for an identifier, i.e., matches [A-Za-z0-9_].
|
|
static string | transcodeToIdentifier (string str) |
| Transforms a string into a valid identifier:
|
|
static string | transcodeToGraphvizIdentifier (const string &originalString) |
| Escapes backslashes, quotes, angle brackets, and pipes in the string, making it a valid identifier in the Graphviz DOT language.
|
|
static string | transcodeFromGraphvizIdentifier (const string &graphvizIdentifier) |
| Removes escapes for backslashes, quotes, angle brackets, and pipes in the Graphviz identifier, making it a normal string.
|
|
static string | generateHtmlFromMarkdown (const string &markdownString) |
| Converts markdownString (a Markdown document) to HTML.
|
|
static string | generateHtmlFromMarkdownLine (const string &markdownString) |
| Converts markdownString (a single line of Markdown text) to HTML.
|
|
static string | expandCamelCase (string camelCaseString) |
| Inserts spaces at CamelCase transitions within the input camelCaseString , capitalizes the first letter of the string, and returns the result.
|
|
static string | makeRandomHash (int length) |
| Returns a random sequence of alphanumeric characters.
|
|
static long | hash (const string &s) |
| Generates an integer hash value for the string.
|
|