EpcTools
An event based multi-threaded C++ development framework.
|
Class that contains various utility functions. More...
#include <eutil.h>
Static Public Member Functions | |
static Int | indexOf (cpStr path, Char search, Int start=0) |
Retrieves the byte index of the search value within the supplied path. More... | |
static Int | indexOfAny (cpStr path, cpStr search) |
Retrieves the byte index of any of the search values within the supplied path. More... | |
static Int | lastIndexOfAny (cpStr path, cpStr search) |
Retrieves the last byte index of any of the search values within the supplied path. More... | |
static std::vector< EString > | split (cpStr s, cpStr delims) |
Splits a string into substrings that are based on the characters in the delimiter array. More... | |
static EString & | replaceAll (EString &str, cpStr srch, size_t srchlen, cpStr rplc, size_t rplclen) |
replaces all occurances of the search string in the provided string with the replacement string. More... | |
static EString | replaceAllCopy (const EString &str, cpStr srch, size_t srchlen, cpStr rplc, size_t rplclen) |
replaces all occurances of the search string in the provided string with the replacement string returning a new string. More... | |
static std::string | string_format (const char *format,...) |
Formats a string using the supplied format string. Uses printf format specifiers. More... | |
static void | string_format (std::string &dest, const char *format,...) |
Formats a string using the supplied format string. Uses printf format specifiers. More... | |
static Void | copy_file (const std::string &dst, const std::string &src) |
Copies the source file to the destination location. More... | |
static Void | copy_file (const char *dst, const std::string &src) |
Copies the source file to the destination location. More... | |
static Void | copy_file (const std::string &dst, const char *src) |
Copies the source file to the destination location. More... | |
static Void | copy_file (const char *dst, const char *src) |
Copies the source file to the destination location. More... | |
static Void | delete_file (const std::string &fn) |
Deletes the supplied file. More... | |
static Void | delete_file (const char *fn) |
Deletes the supplied file. More... | |
static Bool | file_exists (cpStr fn) |
Determines if the supplied file exists. More... | |
static std::string | currentTime () |
Returns a string representation of the current system time. More... | |
Class that contains various utility functions.
|
static |
Copies the source file to the destination location.
dst | the destination file name. |
src | the source file name. |
|
inlinestatic |
Copies the source file to the destination location.
dst | the destination file name. |
src | the source file name. |
|
inlinestatic |
Copies the source file to the destination location.
dst | the destination file name. |
src | the source file name. |
|
inlinestatic |
Copies the source file to the destination location.
dst | the destination file name. |
src | the source file name. |
|
static |
Returns a string representation of the current system time.
|
static |
Deletes the supplied file.
fn | the file name to delete. |
|
inlinestatic |
Deletes the supplied file.
fn | the file name to delete. |
|
inlinestatic |
Determines if the supplied file exists.
|
static |
Retrieves the byte index of the search value within the supplied path.
path | the string to search. |
search | the character to search for. |
start | the byte offset in path where to start the search. |
|
static |
Retrieves the byte index of any of the search values within the supplied path.
path | the string to search. |
search | the characters to search for. |
|
static |
Retrieves the last byte index of any of the search values within the supplied path.
path | the string to search. |
search | the characters to search for. |
|
static |
replaces all occurances of the search string in the provided string with the replacement string.
str | the string to make the replacements in. |
srch | the search string. |
srchlen | the length of the search string. |
rplc | the replacement string. |
rplclen | the length of the replacement string. |
|
static |
replaces all occurances of the search string in the provided string with the replacement string returning a new string.
str | the string to make the replacements in. |
srch | the search string. |
srchlen | the length of the search string. |
rplc | the replacement string. |
rplclen | the length of the replacement string. |
|
static |
Splits a string into substrings that are based on the characters in the delimiter array.
s | the string to split. |
delims | the list of delimiting characters. |
|
static |
Formats a string using the supplied format string. Uses printf format specifiers.
format | the format specification string. |
|
static |
Formats a string using the supplied format string. Uses printf format specifiers.
dest | a string reference where the formatted string will be output. |
format | the format specification string. |