|
|
A group of functions providing macro expansion (substitution) in strings, optionally with quoting appropriate for shell execution.
QString expandMacros ( const QString &str, const QMap<QChar,QString> &map, QChar c = '%' )
| expandMacros |
Perform safe macro expansion (substitution) on a string. The escape char must be quoted with itself to obtain its literal representation in the resulting string.
\code
// Code example
QMap
Parameters:
str | The string to expand |
map | map with substitutions |
c | escape char indicating start of macro, or QChar::null if none |
Returns: the string with all valid macros expanded
QString expandMacrosShellQuote ( const QString &str, const QMap<QChar,QString> &map, QChar c = '%' )
| expandMacrosShellQuote |
Perform safe macro expansion (substitution) on a string for use in shell commands. The escape char must be quoted with itself to obtain its literal representation in the resulting string.
\code
// Code example
QMap
Parameters:
str | The string to expand |
map | map with substitutions |
c | escape char indicating start of macro, or QChar::null if none |
Returns: the string with all valid macros expanded, or a null string if a shell syntax error was detected in the command
QString expandMacros ( const QString &str, const QMap<QString,QString> &map, QChar c = '%' )
| expandMacros |
Perform safe macro expansion (substitution) on a string. The escape char must be quoted with itself to obtain its literal representation in the resulting string. Macro names can consist of chars in the range [A-Za-z0-9_]; use braces to delimit macros from following words starting with these chars, or to use other chars for macro names.
\code
// Code example
QMap
Parameters:
str | The string to expand |
map | map with substitutions |
c | escape char indicating start of macro, or QChar::null if none |
Returns: the string with all valid macros expanded
QString expandMacrosShellQuote ( const QString &str, const QMap<QString,QString> &map, QChar c = '%' )
| expandMacrosShellQuote |
Perform safe macro expansion (substitution) on a string for use in shell commands. The escape char must be quoted with itself to obtain its literal representation in the resulting string. Macro names can consist of chars in the range [A-Za-z0-9_]; use braces to delimit macros from following words starting with these chars, or to use other chars for macro names.
\code
// Code example
QMap
Parameters:
str | The string to expand |
map | map with substitutions |
c | escape char indicating start of macro, or QChar::null if none |
Returns: the string with all valid macros expanded, or a null string if a shell syntax error was detected in the command
QString expandMacros ( const QString &str, const QMap<QChar,QStringList> &map, QChar c = '%' )
| expandMacros |
Same as above, except that the macros expand to string lists that are simply join(" ")ed together.
QString expandMacros ( const QString &str, const QMap<QString,QStringList> &map, QChar c = '%' )
| expandMacros |
QString expandMacrosShellQuote ( const QString &str, const QMap<QChar,QStringList> &map, QChar c = '%' )
| expandMacrosShellQuote |
QString expandMacrosShellQuote ( const QString &str, const QMap<QString,QStringList> &map, QChar c = '%' )
| expandMacrosShellQuote |
Generated by: root on i386.ports.openbsd.org on Tue Sep 9 03:45:14 2003, using kdoc 2.0a54. |