\hypertarget{group__string__functions}{}\section{String Functions}
\label{group__string__functions}\index{String Functions@{String Functions}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_ga1f5360410dc63441327daf2af65b9270}{Qore\+::bindex}} (softstring str, softstring \mbox{\hyperlink{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}{substr}}, softint pos=0)
\begin{DoxyCompactList}\small\item\em Retrieves the byte position of a substring within a string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_gaaecdb10e31e659cc1a2c9b9a40f7a3de}{Qore\+::bindex}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_ga123df73fe420500294a26163371fb175}{Qore\+::brindex}} (softstring str, softstring \mbox{\hyperlink{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}{substr}}, softint pos=-\/1)
\begin{DoxyCompactList}\small\item\em Retrieves the byte position of a substring within a string, starting the search from the end of the string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_gaa0d18a7dbb5ee30d63929328b6876949}{Qore\+::brindex}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga802f2d1c8deb1b120b649bb1e3652095}{Qore\+::chomp}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str)
\begin{DoxyCompactList}\small\item\em Removes the trailing end-\/of-\/line indicator ({\ttfamily \char`\"{}\textbackslash{}n\char`\"{}} or {\ttfamily \char`\"{}\textbackslash{}r\textbackslash{}n\char`\"{}}) from a string and returns the new string (also see the \mbox{\hyperlink{operators_chomp}{chomp operator}}) \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga61a8689fa83f71e7c92f502ffc305ba6}{Qore\+::chomp}} (reference$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ str)
\begin{DoxyCompactList}\small\item\em Removes the trailing end-\/of-\/line indicator ({\ttfamily \char`\"{}\textbackslash{}n\char`\"{}} or {\ttfamily \char`\"{}\textbackslash{}r\textbackslash{}n\char`\"{}}) from a reference to a string and returns the new string (also see the \mbox{\hyperlink{operators_chomp}{chomp operator}}) \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga343548c069d7b8d02c522acd05179bf1}{Qore\+::chomp}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gad77c02ae2ce2f5c321b98bb64a0e34c2}{Qore\+::chr}} (softint val, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding)
\begin{DoxyCompactList}\small\item\em Returns a string containing a single A\+S\+C\+II character represented by the numeric value passed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga07747d840b6c78d747afefd4d97495e8}{Qore\+::chr}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant returns a string with a single A\+S\+C\+II N\+U\+LL (\textquotesingle{}\textbackslash{}0\textquotesingle{}); it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga59eee6c7078dcb8221b554eddaba2a7a}{Qore\+::chr}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga02c8ad6db7ae5c0930c8050840253035}{Qore\+::convert\+\_\+encoding}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding)
\begin{DoxyCompactList}\small\item\em Performs explicit string character encoding conversions. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_gab1555ebefd40327741bb93177a6c8ec0}{Qore\+::convert\+\_\+encoding}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga4aeb0ae8aaf5cae9c3a4dfde8e8d92be}{Qore\+::f\+\_\+printf}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt,...)
\begin{DoxyCompactList}\small\item\em Outputs the string passed to standard output, using the first argument as a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}; enforces field widths on arguments larger than the given field width. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga7339327f0976a4d0f765620448534ecc}{Qore\+::f\+\_\+printf}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga859e7c350c00ade5ebeb8e2c6a3d9b1f}{Qore\+::f\+\_\+sprintf}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt,...)
\begin{DoxyCompactList}\small\item\em Returns a formatted string based on a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and other arguments; enforces field widths on arguments larger than the given field width. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga53ae4d23416145fb8dfc73146c2f1fcb}{Qore\+::f\+\_\+sprintf}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga1d7d26076f388e311973a244850fd750}{Qore\+::f\+\_\+vprintf}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt, auto varg)
\begin{DoxyCompactList}\small\item\em Outputs the string passed to standard output, using the first argument as a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and a second argument giving a list or a single argument to the format string; enforces field widths on arguments larger than the given field width. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga520bbbb55eebf102da87aedcbe37d2ff}{Qore\+::f\+\_\+vsprintf}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt, auto varg)
\begin{DoxyCompactList}\small\item\em Returns a formatted string based on a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and other arguments given as a list after the format string; enforces field widths on arguments larger than the given field width. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga56e62bf88b3fa54aa9aa75508d5d6c05}{Qore\+::flush}} ()
\begin{DoxyCompactList}\small\item\em Flushes output to the console output with \mbox{\hyperlink{group__string__functions_ga996c5d1686fbc245f0bc7a02012e6a33}{print()}}, \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf()}}, etc. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gae583afd778a92a7b2a3027383fd75ed4}{Qore\+::force\+\_\+encoding}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding)
\begin{DoxyCompactList}\small\item\em Returns the first string argument tagged with the character encoding given as the second argument; does not actually change the string data. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_gaaf459e46d453147d330083e2680823dd}{Qore\+::force\+\_\+encoding}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga33bb08516773ed10def16bb42d6b8159}{Qore\+::format\+\_\+number}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt, softfloat num)
\begin{DoxyCompactList}\small\item\em Returns a string of a formatted number according to a number argument and a format string. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_gaa03f03e0fe8bc5aaeb9bee8fb35b01f2}{Qore\+::format\+\_\+number}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gac4a81651e374644e697e3ce61c373694}{Qore\+::get\+\_\+encoding}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str)
\begin{DoxyCompactList}\small\item\em Returns a string describing the character encoding of the string argument passed. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga800639b45a2c9b2f0e6effc687a52097}{Qore\+::get\+\_\+encoding}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_gadaea9cfa0f698a6fb0650f70cf8d929e}{Qore\+::index}} (softstring str, softstring \mbox{\hyperlink{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}{substr}}, softint pos=0)
\begin{DoxyCompactList}\small\item\em Retrieves the character position of a substring within a string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_gab2ccb59779f7860a4e67af5b5a3bc766}{Qore\+::index}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga2470edb3a13437c060ec85e7653e022a}{Qore\+::join}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str,...)
\begin{DoxyCompactList}\small\item\em Creates a string from separator string and a list of arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga07a2c7b7cc0f2139f75330815d45007b}{Qore\+::join}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ auto $>$ l)
\begin{DoxyCompactList}\small\item\em Creates a string from separator string and a list of arguments. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga9354dbf44cdf06b8011eb4f1409236b8}{Qore\+::join}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_ga5ae69f518a47e6146bf2285a54804455}{Qore\+::length}} (softstring str)
\begin{DoxyCompactList}\small\item\em Returns the length in characters for the string passed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_ga4bb7464900907fdeca6696c31944758e}{Qore\+::length}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin)
\begin{DoxyCompactList}\small\item\em Returns the number of bytes in the binary object passed as an argument. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga46649277a74fa0dfc28f0125fcbfe7e5}{Qore\+::length}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_ga9792aac3fb720e90180f5c6b517852e3}{Qore\+::length}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gaa3c396510f9d106aee5161cbb144e163}{Qore\+::ltrim}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} chars)
\begin{DoxyCompactList}\small\item\em Removes byte characters from the start of a string and returns the new string. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga51cd422758d497338d9fe3aa1c9e3510}{Qore\+::ltrim}} (reference$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ str, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} chars)
\begin{DoxyCompactList}\small\item\em Removes byte characters from the start of a reference to an lvalue containing a string and returns string after processing. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_gab1aedfc4b3b7aed6dffead7e46c72b07}{Qore\+::ord}} (softstring str, softint offset=0)
\begin{DoxyCompactList}\small\item\em Gives the positive numeric value of the given byte in the string passed; if no string is passed or the offset is after the end of the string, -\/1 is returned. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_gab998e345a65c1e98ca9370c3a324f9cb}{Qore\+::ord}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__string__functions_ga774b6d0f9d5835de7d7362400aa2cdd1}{Qore\+::parse\+\_\+boolean}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str)
\begin{DoxyCompactList}\small\item\em tries to parse a string value as a boolean \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__string__functions_ga8298a57727b58a941a736c9894ce40c6}{Qore\+::parse\+\_\+boolean}} (any val)
\begin{DoxyCompactList}\small\item\em returns the first value passed as a boolean \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{float}} \mbox{\hyperlink{group__string__functions_gad09a541dcd0e0f42a0447c92a7a60d36}{Qore\+::parse\+\_\+float}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt)
\begin{DoxyCompactList}\small\item\em returns a floating-\/point value corresponding to a string representing the number and an argument giving the format \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_gac63ded32a4a0217e954935848210808e}{Qore\+::parse\+\_\+int}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt)
\begin{DoxyCompactList}\small\item\em returns an integer corresponding to a string representing the number and an argument giving the format \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number}} \mbox{\hyperlink{group__string__functions_ga0024906d05096f7f8c1130396dde53c7}{Qore\+::parse\+\_\+number}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt)
\begin{DoxyCompactList}\small\item\em returns a number corresponding to the string and the argument, giving the format \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga996c5d1686fbc245f0bc7a02012e6a33}{Qore\+::print}} (...)
\begin{DoxyCompactList}\small\item\em Outputs a string to standard output with no formatting. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{Qore\+::printf}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt,...)
\begin{DoxyCompactList}\small\item\em Outputs the string passed to standard output, using the first argument as a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}; does not enforce field widths on arguments larger than the given field width. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gafa558d5962543431e9d3f872c481693a}{Qore\+::printf}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__string__functions_ga7804f63df9b181e0bacb465eb912feb9}{Qore\+::regex}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} regex, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} options=0)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the regular expression matches the string passed, otherwise returns \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_gab17427299ed00ee52d90beadc55ba608}{Qore\+::regex}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ $\ast$\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{group__string__functions_ga9f8c21f961daa29578dcfd596f5871ff}{Qore\+::regex\+\_\+extract}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga7804f63df9b181e0bacb465eb912feb9}{regex}}, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} options=0)
\begin{DoxyCompactList}\small\item\em Returns a list of substrings in a string based on matching patterns defined by a regular expression. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga3461a37dbd3d51bc03e58b85daae2466}{Qore\+::regex\+\_\+extract}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gad8963269da93fe1ebaa179dab8d315fa}{Qore\+::regex\+\_\+subst}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga7804f63df9b181e0bacb465eb912feb9}{regex}}, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} subst, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} options=0)
\begin{DoxyCompactList}\small\item\em Returns a string with patterns substituted according to the arguments passed. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_gaaf6eccd667d478b31ce20cde7556491f}{Qore\+::regex\+\_\+subst}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga757f5b4682cb6787e7e186ddcc2b2b56}{Qore\+::replace}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} source, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} target, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} start=0, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} end=-\/1)
\begin{DoxyCompactList}\small\item\em Replaces all occurrences of a substring in a string with another string. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga18db5008b245ff4346386a107b19b2ba}{Qore\+::replace}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga1a77feb53e86b659be6d9eea7d3618e8}{Qore\+::reverse}} (softstring str)
\begin{DoxyCompactList}\small\item\em Reverses a string and returns the new string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_ga55663008aa59489b869e558b29c7c22d}{Qore\+::rindex}} (softstring str, softstring \mbox{\hyperlink{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}{substr}}, softint pos=-\/1)
\begin{DoxyCompactList}\small\item\em Retrieves the character position of a substring within a string, starting the search from the end of the string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_ga390f6c11ecc55c179293de8e87605d2f}{Qore\+::rindex}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga25264bfb9950ac66862db9b4a32eeee8}{Qore\+::rtrim}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} chars)
\begin{DoxyCompactList}\small\item\em Removes byte characters from the end of a string and returns the new string. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gaf46773aba9e3ea83b31c60ae0bc22c73}{Qore\+::rtrim}} (reference$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ str, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} chars)
\begin{DoxyCompactList}\small\item\em Removes byte characters from the end of a reference to an lvalue containing a string and returns string after processing. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{group__string__functions_ga3b0ca637686a083710559ab70be0ec19}{Qore\+::split}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sep, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, bool with\+\_\+separator=\mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}})
\begin{DoxyCompactList}\small\item\em Splits a string into a list of components based on a separator string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{group__string__functions_gad3db83c0fd5df500b0cc9d2ddb0e7d85}{Qore\+::split}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} sep, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} quote, bool trim\+\_\+unquoted=\mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}})
\begin{DoxyCompactList}\small\item\em Splits a string into a list of components based on a separator string and a quote character. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} $>$ \mbox{\hyperlink{group__string__functions_ga2230070c2f14ca70e63cf463f5d688c3}{Qore\+::split}} (data sep, \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} data)
\begin{DoxyCompactList}\small\item\em Returns a list of binary objects representing each component of the binary object separated by the bytes identified by the separator argument, with the separator removed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{group__string__functions_gad309b548d2cbeb77ab83d92cea49ba50}{Qore\+::split}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga7a74be141f814ef286046c367b21091c}{Qore\+::sprintf}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt,...)
\begin{DoxyCompactList}\small\item\em Returns a formatted string based on a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and other arguments; does not enforce field widths on arguments larger than the given field width. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gaadd7e7a29545d6dcb6b886487cb64b18}{Qore\+::sprintf}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_gafc530772b929b2148ae2733569bada58}{Qore\+::strlen}} (softstring str)
\begin{DoxyCompactList}\small\item\em Returns the length in bytes of the string argument. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga3c5426eab56d284c42e16d576c241424}{Qore\+::strlen}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__string__functions_ga79d3f37ac6e2f76c800b1a3d0db62b71}{Qore\+::strlen}} (auto arg)
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gaabfb10141a51d31ef100d9fd3a02252e}{Qore\+::strmul}} (softstring str, softint smul, \+\_\+\+\_\+7\+\_\+ softint offset)
\begin{DoxyCompactList}\small\item\em Returns a new string with a repeated string element and optionally removing trailing characters. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}{Qore\+::substr}} (softstring str, softint start)
\begin{DoxyCompactList}\small\item\em Returns a portion of a string starting from an integer offset. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga7893910a0881f74365a20ec7a46014b6}{Qore\+::substr}} (softstring str, softint start, softint len)
\begin{DoxyCompactList}\small\item\em Returns a portion of a string starting from an integer offset, with a length parameter. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__string__functions_ga8b90bec06c9dabd6d54fff51684f9da6}{Qore\+::substr}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} b, softint start)
\begin{DoxyCompactList}\small\item\em Returns a portion of a binary object starting from an integer offset. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__string__functions_gaf00ab0e1f2c880e0da287c102aca9873}{Qore\+::substr}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} b, softint start, softint len)
\begin{DoxyCompactList}\small\item\em Returns a portion of a binary object starting from an integer offset, with a length parameter. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga6d76c09df83d593dcb4d80b1988d1b88}{Qore\+::substr}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga69274a2dc60bef5acb7a8adad8b96b8b}{Qore\+::tolower}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str)
\begin{DoxyCompactList}\small\item\em Returns a string in all lower-\/case characters based on the argument passed. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_gaee3b0330c18a79c0a474cad90724ba26}{Qore\+::tolower}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga55350788372fc736eee9c0102ec82215}{Qore\+::toupper}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str)
\begin{DoxyCompactList}\small\item\em Returns a string in all upper-\/case characters based on the argument passed. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_ga89a2d29770895c7fc27ce3e95d657315}{Qore\+::toupper}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gae8d314e819a299d46d181696600d4293}{Qore\+::trim}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} chars)
\begin{DoxyCompactList}\small\item\em Removes byte characters from the start and end of a string and returns the new string (also see the \mbox{\hyperlink{operators_trim}{trim operator}}) \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gabcd44cef4eddf5659153a57bdc312db8}{Qore\+::trim}} (reference$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ str, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} chars)
\begin{DoxyCompactList}\small\item\em Removes byte characters from the start and end of a reference to an lvalue containing a string and returns string after processing (also see the \mbox{\hyperlink{operators_trim}{trim operator}}) \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__string__functions_gaff249219345cbb027c8868c82585383a}{Qore\+::trim}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga49c6b104180fd40bb21d164773df1f4b}{Qore\+::trunc\+\_\+str}} (softstring str, softint len, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding)
\begin{DoxyCompactList}\small\item\em Returns a truncated string with no more than the given number of bytes and optionally converted to a specific \mbox{\hyperlink{character_encoding}{character encoding}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga9729dd36419226b458d929a7d2ceb4e8}{Qore\+::vprintf}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt, auto varg)
\begin{DoxyCompactList}\small\item\em Outputs the string passed to standard output, using the first argument as a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and a second argument giving a list or a single argument to the format string; does not enforce field widths on arguments larger than the given field width. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_ga3204bee77dc83e5095f95f6582e591c0}{Qore\+::vprintf}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gab2494031a30dc02d9f6696435a8c4485}{Qore\+::vsprintf}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} fmt, auto varg)
\begin{DoxyCompactList}\small\item\em Returns a formatted string based on a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and other arguments given as a list after the format string; does not enforce field widths on arguments larger than the given field width. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__string__functions_gab53f40cb39abb3bd2a4d782741b6b0bd}{Qore\+::vsprintf}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hypertarget{group__string__functions_string_formatting}{}\subsection{String Formatting}\label{group__string__functions_string_formatting}
String formatting in Qore is based on c-\/style \char`\"{}printf\char`\"{} string formatting.

There are three types of objects in the format string\+:
\begin{DoxyItemize}
\item Plain characters, which are copied as-\/is to the output string
\item Escape characters, which are converted and copied to the output string
\item Format specifications for arguments to be included in the output string, which are preceded by the percent sign {\ttfamily \char`\"{}\%\char`\"{}} 
\end{DoxyItemize}

\begin{DoxyNote}{Note}
The percent sign {\ttfamily \char`\"{}\%\char`\"{}} always starts a format specification unless it is followed by another {\ttfamily \char`\"{}\%\char`\"{}} sign, in this case only one {\ttfamily \char`\"{}\%\char`\"{}} is output (ie {\ttfamily \char`\"{}\%\%\char`\"{}} in the format string is output as a single {\ttfamily \char`\"{}\%\char`\"{}})
\end{DoxyNote}
\hypertarget{group__string__functions_format_specification}{}\subsubsection{format\+\_\+specification}\label{group__string__functions_format_specification}
After the {\ttfamily \char`\"{}\%\char`\"{}} sign, there can be zero or more formatting flags as in the following table\+:

{\bfseries Printf Formatting Flags}  \tabulinesep=1mm
\begin{longtabu} spread 0pt [c]{*{2}{|X[-1]}|}
\hline
{\bfseries Flag} &{\bfseries Description}  \\\cline{1-2}
{\ttfamily -\/}  &left-\/justify the field  \\\cline{1-2}
{\ttfamily +}  &include the sign for the number (+ or -\/)  \\\cline{1-2}
{\ttfamily 0}  &use zero left padding rather than space padding  \\\cline{1-2}
{\itshape space} &use space padding  \\\cline{1-2}
\end{longtabu}


Then a field width specifier can optionally be given as a string of digits specifying the length of the field. With \char`\"{}field\char`\"{} functions (function names preceded by {\ttfamily \char`\"{}f\+\_\+\char`\"{}}), these width specifiers are hard limits; that is; arguments longer than the width specified are truncated to the specified width.

For floating-\/point arguments, a precision specifier may be given by including a period \char`\"{}.\char`\"{} and another digit string, which indicates the number of digits to appear after the decimal point.

Then the format character is given as follows\+:

{\bfseries Printf Formatting Characters}  \tabulinesep=1mm
\begin{longtabu} spread 0pt [c]{*{2}{|X[-1]}|}
\hline
{\bfseries Character} &{\bfseries Description}  \\\cline{1-2}
{\ttfamily s}  &string  \\\cline{1-2}
{\ttfamily d}  &Integer, output in base 10 format  \\\cline{1-2}
{\ttfamily o}  &Integer, output in base 8 (octal) format  \\\cline{1-2}
{\ttfamily f}  &Literal floating point value  \\\cline{1-2}
{\ttfamily F}  &Literat floating point value  \\\cline{1-2}
{\ttfamily a}  &Hexadecimal floating-\/point output with lower-\/case {\ttfamily \char`\"{}0x\char`\"{}} and {\ttfamily \char`\"{}abcdef\char`\"{}}   \\\cline{1-2}
{\ttfamily A}  &Hexadecimal floating-\/point output with upper-\/case {\ttfamily \char`\"{}0\+X\char`\"{}} and {\ttfamily \char`\"{}\+A\+B\+C\+D\+E\+F\char`\"{}}   \\\cline{1-2}
{\ttfamily g}  &compact floating-\/point output using a lower-\/case {\ttfamily \char`\"{}e\char`\"{}} for exponential output when necessary  \\\cline{1-2}
{\ttfamily G}  &compact floating-\/point output using an upper-\/case {\ttfamily \char`\"{}\+E\char`\"{}} for exponential output when necessary  \\\cline{1-2}
{\ttfamily n}  &Any Qore value, formatted as a string, without any line breaks  \\\cline{1-2}
{\ttfamily N}  &Any Qore value, formatted as a string, with line breaks and whitespace formatting for complex objects  \\\cline{1-2}
{\ttfamily x}  &Integer, output in base 16 (hexadecimal) format with lower-\/case a-\/f  \\\cline{1-2}
{\ttfamily X}  &Integer, output in base 16 (hexadecimal) format with upper-\/case A-\/F  \\\cline{1-2}
{\ttfamily y}  &Any Qore value, formatted as a pseudo-\/\+Y\+A\+ML string, without any line breaks; this format option is similar to {\ttfamily \char`\"{}\%n\char`\"{}}, but uses a Y\+A\+M\+L-\/like format. Note that the output is not guaranteed to be parsed by the yaml module\textquotesingle{}s parse\+Y\+A\+M\+L() function; it is for display purposes only; to get real Y\+A\+ML functionality, use the yaml module.  \\\cline{1-2}
\end{longtabu}


\label{group__string__functions_string_escape_chars}%
\Hypertarget{group__string__functions_string_escape_chars}%
 {\bfseries String Escape Characters}  \tabulinesep=1mm
\begin{longtabu} spread 0pt [c]{*{2}{|X[-1]}|}
\hline
{\bfseries Escape Characters} &{\bfseries Description}  \\\cline{1-2}
{\ttfamily \textbackslash{}b}  &a backspace character  \\\cline{1-2}
{\ttfamily \textbackslash{}f}  &a form-\/feed character  \\\cline{1-2}
{\ttfamily \textbackslash{}n}  &a newline character  \\\cline{1-2}
{\ttfamily \textbackslash{}r}  &a carriage-\/return character  \\\cline{1-2}
{\ttfamily \textbackslash{}t}  &a tab character  \\\cline{1-2}
{\ttfamily \textbackslash{}v}  &a vertical tab character  \\\cline{1-2}
{\ttfamily \textbackslash{}{\itshape num}}  &an 8-\/bit character whose value is the 1, 2, or 3 digit octal number {\itshape num}   \\\cline{1-2}
{\ttfamily \textbackslash{}"}  &a double-\/quote character ({\ttfamily "})  \\\cline{1-2}
{\ttfamily \textbackslash{}\textbackslash{}}  &a backslash character  \\\cline{1-2}
\end{longtabu}


\begin{DoxyWarning}{Warning}
Trying to escape a 3-\/digit octal number in the range 400-\/777 will result in a {\ttfamily P\+A\+R\+S\+E-\/\+E\+X\+C\+E\+P\+T\+I\+ON} being thrown. Trying to parse a number starting with 8 or 9 will result in that number being reproduced literally. 
\begin{DoxyCode}
string abc = \textcolor{stringliteral}{"Number: \(\backslash\)455"}; \textcolor{comment}{# will throw a parse error}
\end{DoxyCode}
 
\begin{DoxyCode}
string abc = \textcolor{stringliteral}{"Number: \(\backslash\)820"};
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(abc); \textcolor{comment}{# will print out "Number: 820"}
\end{DoxyCode}

\end{DoxyWarning}
\begin{DoxyNote}{Note}
Trying to escape any other character will result in that character being reproduced literally\+: 
\begin{DoxyCode}
string abc = \textcolor{stringliteral}{"He\(\backslash\)llo\(\backslash\), worl\(\backslash\)d!"};
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(abc); \textcolor{comment}{# will print out "Hello, world!"}
\end{DoxyCode}
 
\end{DoxyNote}


\subsection{Function Documentation}
\mbox{\Hypertarget{group__string__functions_ga1f5360410dc63441327daf2af65b9270}\label{group__string__functions_ga1f5360410dc63441327daf2af65b9270}} 
\index{String Functions@{String Functions}!bindex@{bindex}}
\index{bindex@{bindex}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{bindex()}{bindex()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::bindex (\begin{DoxyParamCaption}\item[{softstring}]{str,  }\item[{softstring}]{substr,  }\item[{softint}]{pos = {\ttfamily 0} }\end{DoxyParamCaption})}



Retrieves the byte position of a substring within a string. 

The {\itshape pos} argument and the return value are in byte positions; byte offsets may differ from the character offsets with multi-\/byte \mbox{\hyperlink{character_encoding}{character encodings}}.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to search in \\
\hline
{\em substr} & the substring to find in {\itshape str} \\
\hline
{\em pos} & the starting character position for the search\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the byte position of a substring within a string, -\/1 is returned if the substring is not found
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int i = \mbox{\hyperlink{group__string__functions_ga1f5360410dc63441327daf2af65b9270}{bindex}}(str, substr);
\textcolor{keywordflow}{if} (i == -1)
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"could not find %y in %y\(\backslash\)n"}, substr, str);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
no character encoding conversions are made by this function even if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a53392adad0eab1542d3d8bc9c91da89c}{Qore\+::zzz8stringzzz9\+::find(softstring, softint)}}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_af2463dc9c06ba8318b7030f040cfa85d}{Qore\+::zzz8stringzzz9\+::rfind(softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_gadaea9cfa0f698a6fb0650f70cf8d929e}{index(softstring, softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_ga55663008aa59489b869e558b29c7c22d}{rindex(softstring, softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_ga123df73fe420500294a26163371fb175}{brindex(softstring, softstring, softint)}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_gaaecdb10e31e659cc1a2c9b9a40f7a3de}\label{group__string__functions_gaaecdb10e31e659cc1a2c9b9a40f7a3de}} 
\index{String Functions@{String Functions}!bindex@{bindex}}
\index{bindex@{bindex}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{bindex()}{bindex()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::bindex (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga123df73fe420500294a26163371fb175}\label{group__string__functions_ga123df73fe420500294a26163371fb175}} 
\index{String Functions@{String Functions}!brindex@{brindex}}
\index{brindex@{brindex}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{brindex()}{brindex()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::brindex (\begin{DoxyParamCaption}\item[{softstring}]{str,  }\item[{softstring}]{substr,  }\item[{softint}]{pos = {\ttfamily -\/1} }\end{DoxyParamCaption})}



Retrieves the byte position of a substring within a string, starting the search from the end of the string. 

The {\itshape pos} argument and the return value are in byte positions; byte offsets may differ from the character offsets with multi-\/byte \mbox{\hyperlink{character_encoding}{character encodings}}.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to search in \\
\hline
{\em substr} & the substring to find in {\itshape str} \\
\hline
{\em pos} & the starting character position for the search, -\/1 means start from the end of the string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the byte position of a substring within a string, -\/1 is returned if the substring is not found
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int i = \mbox{\hyperlink{group__string__functions_ga123df73fe420500294a26163371fb175}{brindex}}(str, substr);
\textcolor{keywordflow}{if} (i == -1)
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"could not find %y in %y\(\backslash\)n"}, substr, str);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
no character encoding conversions are made by this function even if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a53392adad0eab1542d3d8bc9c91da89c}{Qore\+::zzz8stringzzz9\+::find(softstring, softint)}}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_af2463dc9c06ba8318b7030f040cfa85d}{Qore\+::zzz8stringzzz9\+::rfind(softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_gadaea9cfa0f698a6fb0650f70cf8d929e}{index(softstring, softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_ga1f5360410dc63441327daf2af65b9270}{bindex(softstring, softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_ga55663008aa59489b869e558b29c7c22d}{rindex(softstring, softstring, softint)}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_gaa0d18a7dbb5ee30d63929328b6876949}\label{group__string__functions_gaa0d18a7dbb5ee30d63929328b6876949}} 
\index{String Functions@{String Functions}!brindex@{brindex}}
\index{brindex@{brindex}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{brindex()}{brindex()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::brindex (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga802f2d1c8deb1b120b649bb1e3652095}\label{group__string__functions_ga802f2d1c8deb1b120b649bb1e3652095}} 
\index{String Functions@{String Functions}!chomp@{chomp}}
\index{chomp@{chomp}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{chomp()}{chomp()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::chomp (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str }\end{DoxyParamCaption})}



Removes the trailing end-\/of-\/line indicator ({\ttfamily \char`\"{}\textbackslash{}n\char`\"{}} or {\ttfamily \char`\"{}\textbackslash{}r\textbackslash{}n\char`\"{}}) from a string and returns the new string (also see the \mbox{\hyperlink{operators_chomp}{chomp operator}}) 

If no E\+OL indicator is present in the string, this function simply returns the original string unmodified.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new string with any end-\/of-\/line character(s) removed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string line = \mbox{\hyperlink{group__string__functions_ga802f2d1c8deb1b120b649bb1e3652095}{chomp}}(\textcolor{stringliteral}{"hello\(\backslash\)n"}); \textcolor{comment}{# returns "hello"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
the \mbox{\hyperlink{operators_chomp}{chomp operator}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga61a8689fa83f71e7c92f502ffc305ba6}\label{group__string__functions_ga61a8689fa83f71e7c92f502ffc305ba6}} 
\index{String Functions@{String Functions}!chomp@{chomp}}
\index{chomp@{chomp}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{chomp()}{chomp()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::chomp (\begin{DoxyParamCaption}\item[{reference$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$}]{str }\end{DoxyParamCaption})}



Removes the trailing end-\/of-\/line indicator ({\ttfamily \char`\"{}\textbackslash{}n\char`\"{}} or {\ttfamily \char`\"{}\textbackslash{}r\textbackslash{}n\char`\"{}}) from a reference to a string and returns the new string (also see the \mbox{\hyperlink{operators_chomp}{chomp operator}}) 

This variant accepts variable references, in which case it will modify the string in place and also return the modified string


\begin{DoxyParams}{Parameters}
{\em str} & a reference to an lvalue continaing the string value to process; if the lvalue does not have a string value \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the string as modified
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_ga802f2d1c8deb1b120b649bb1e3652095}{chomp}}(\(\backslash\)str);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga343548c069d7b8d02c522acd05179bf1}\label{group__string__functions_ga343548c069d7b8d02c522acd05179bf1}} 
\index{String Functions@{String Functions}!chomp@{chomp}}
\index{chomp@{chomp}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{chomp()}{chomp()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily nothing Qore\+::chomp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gad77c02ae2ce2f5c321b98bb64a0e34c2}\label{group__string__functions_gad77c02ae2ce2f5c321b98bb64a0e34c2}} 
\index{String Functions@{String Functions}!chr@{chr}}
\index{chr@{chr}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{chr()}{chr()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::chr (\begin{DoxyParamCaption}\item[{softint}]{val,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})}



Returns a string containing a single A\+S\+C\+II character represented by the numeric value passed. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em val} & the byte value of the character; only the least-\/significant byte is used \\
\hline
{\em encoding} & the character encoding tag for the string return value; if not present, the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} is assumed\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string containing a single A\+S\+C\+II character represented by the numeric value passed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string char = \mbox{\hyperlink{group__string__functions_gad77c02ae2ce2f5c321b98bb64a0e34c2}{chr}}(13);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+5 the encoding argument is supported 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga07747d840b6c78d747afefd4d97495e8}\label{group__string__functions_ga07747d840b6c78d747afefd4d97495e8}} 
\index{String Functions@{String Functions}!chr@{chr}}
\index{chr@{chr}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{chr()}{chr()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::chr (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant returns a string with a single A\+S\+C\+II N\+U\+LL (\textquotesingle{}\textbackslash{}0\textquotesingle{}); it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a string with a single A\+S\+C\+II N\+U\+LL (\textquotesingle{}\textbackslash{}0\textquotesingle{}) 
\end{DoxyReturn}
\mbox{\Hypertarget{group__string__functions_ga59eee6c7078dcb8221b554eddaba2a7a}\label{group__string__functions_ga59eee6c7078dcb8221b554eddaba2a7a}} 
\index{String Functions@{String Functions}!chr@{chr}}
\index{chr@{chr}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{chr()}{chr()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily nothing Qore\+::chr (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga02c8ad6db7ae5c0930c8050840253035}\label{group__string__functions_ga02c8ad6db7ae5c0930c8050840253035}} 
\index{String Functions@{String Functions}!convert\+\_\+encoding@{convert\+\_\+encoding}}
\index{convert\+\_\+encoding@{convert\+\_\+encoding}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{convert\+\_\+encoding()}{convert\_encoding()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::convert\+\_\+encoding (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})}



Performs explicit string character encoding conversions. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to convert \\
\hline
{\em encoding} & the encoding for the return value\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string corresponding to the string argument converted to the encoding given
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string enc = \mbox{\hyperlink{group__string__functions_ga02c8ad6db7ae5c0930c8050840253035}{convert\_encoding}}(str, \textcolor{stringliteral}{"iso-8859-1"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}} and an error occurs during encoding conversion \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__string__functions_gab1555ebefd40327741bb93177a6c8ec0}\label{group__string__functions_gab1555ebefd40327741bb93177a6c8ec0}} 
\index{String Functions@{String Functions}!convert\+\_\+encoding@{convert\+\_\+encoding}}
\index{convert\+\_\+encoding@{convert\+\_\+encoding}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{convert\+\_\+encoding()}{convert\_encoding()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::convert\+\_\+encoding (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga4aeb0ae8aaf5cae9c3a4dfde8e8d92be}\label{group__string__functions_ga4aeb0ae8aaf5cae9c3a4dfde8e8d92be}} 
\index{String Functions@{String Functions}!f\+\_\+printf@{f\+\_\+printf}}
\index{f\+\_\+printf@{f\+\_\+printf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{f\+\_\+printf()}{f\_printf()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::f\+\_\+printf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}



Outputs the string passed to standard output, using the first argument as a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}; enforces field widths on arguments larger than the given field width. 

This function will truncate output longer than any field width given in the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} \\
\hline
{\em ...} & the argument(s) corresponding to format specifiers in the format string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the formatted string output corresponding to the arguments given
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_ga4aeb0ae8aaf5cae9c3a4dfde8e8d92be}{f\_printf}}(\textcolor{stringliteral}{"%5s"}, \textcolor{stringliteral}{"a long string"}); \textcolor{comment}{# will print out "a lon"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_string_formatting}{String Formatting}} for information on the formatting \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}
\item \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf()}} for a similar function that does not enforce field widths 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga7339327f0976a4d0f765620448534ecc}\label{group__string__functions_ga7339327f0976a4d0f765620448534ecc}} 
\index{String Functions@{String Functions}!f\+\_\+printf@{f\+\_\+printf}}
\index{f\+\_\+printf@{f\+\_\+printf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{f\+\_\+printf()}{f\_printf()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::f\+\_\+printf (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga859e7c350c00ade5ebeb8e2c6a3d9b1f}\label{group__string__functions_ga859e7c350c00ade5ebeb8e2c6a3d9b1f}} 
\index{String Functions@{String Functions}!f\+\_\+sprintf@{f\+\_\+sprintf}}
\index{f\+\_\+sprintf@{f\+\_\+sprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{f\+\_\+sprintf()}{f\_sprintf()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::f\+\_\+sprintf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}



Returns a formatted string based on a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and other arguments; enforces field widths on arguments larger than the given field width. 

This function will truncate output longer than any field width given in the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} \\
\hline
{\em ...} & the argument(s) corresponding to format specifiers in the format string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a formatted string corresponding to the arguments given
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = \mbox{\hyperlink{group__string__functions_ga859e7c350c00ade5ebeb8e2c6a3d9b1f}{f\_sprintf}}(\textcolor{stringliteral}{"%5s"}, \textcolor{stringliteral}{"a long string"}); \textcolor{comment}{# will return "a lon"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_string_formatting}{String Formatting}} for information on the formatting \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}
\item \mbox{\hyperlink{group__string__functions_ga7a74be141f814ef286046c367b21091c}{sprintf()}} for a similar function that does not enforce field widths 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga53ae4d23416145fb8dfc73146c2f1fcb}\label{group__string__functions_ga53ae4d23416145fb8dfc73146c2f1fcb}} 
\index{String Functions@{String Functions}!f\+\_\+sprintf@{f\+\_\+sprintf}}
\index{f\+\_\+sprintf@{f\+\_\+sprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{f\+\_\+sprintf()}{f\_sprintf()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::f\+\_\+sprintf (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga1d7d26076f388e311973a244850fd750}\label{group__string__functions_ga1d7d26076f388e311973a244850fd750}} 
\index{String Functions@{String Functions}!f\+\_\+vprintf@{f\+\_\+vprintf}}
\index{f\+\_\+vprintf@{f\+\_\+vprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{f\+\_\+vprintf()}{f\_vprintf()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::f\+\_\+vprintf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt,  }\item[{auto}]{varg }\end{DoxyParamCaption})}



Outputs the string passed to standard output, using the first argument as a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and a second argument giving a list or a single argument to the format string; enforces field widths on arguments larger than the given field width. 

This function will truncate output longer than any field width given in the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} \\
\hline
{\em varg} & the argument(s) corresponding to format specifiers in the format string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the formatted string output corresponding to the arguments given
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_ga1d7d26076f388e311973a244850fd750}{f\_vprintf}}(\textcolor{stringliteral}{"%5s %3d"}, (\textcolor{stringliteral}{"a long string"}, 5000)); \textcolor{comment}{# will print out "a lon 500"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_string_formatting}{String Formatting}} for information on the formatting \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}
\item \mbox{\hyperlink{group__string__functions_ga9729dd36419226b458d929a7d2ceb4e8}{vprintf()}} for a similar function that does not enforce field widths
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+4 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga520bbbb55eebf102da87aedcbe37d2ff}\label{group__string__functions_ga520bbbb55eebf102da87aedcbe37d2ff}} 
\index{String Functions@{String Functions}!f\+\_\+vsprintf@{f\+\_\+vsprintf}}
\index{f\+\_\+vsprintf@{f\+\_\+vsprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{f\+\_\+vsprintf()}{f\_vsprintf()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::f\+\_\+vsprintf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt,  }\item[{auto}]{varg }\end{DoxyParamCaption})}



Returns a formatted string based on a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and other arguments given as a list after the format string; enforces field widths on arguments larger than the given field width. 

This function will truncate output longer than any field width given in the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} \\
\hline
{\em varg} & the argument(s) corresponding to format specifiers in the format string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a formatted string corresponding to the arguments given
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = \mbox{\hyperlink{group__string__functions_ga520bbbb55eebf102da87aedcbe37d2ff}{f\_vsprintf}}(\textcolor{stringliteral}{"%5s %3d\(\backslash\)n"}, (\textcolor{stringliteral}{"a lon"}, 500)); \textcolor{comment}{# will return "a lon 500"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_string_formatting}{String Formatting}} for information on the formatting \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}
\item \mbox{\hyperlink{group__string__functions_gab2494031a30dc02d9f6696435a8c4485}{vsprintf()}} for a similar function that does not enforce field widths
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+4 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga56e62bf88b3fa54aa9aa75508d5d6c05}\label{group__string__functions_ga56e62bf88b3fa54aa9aa75508d5d6c05}} 
\index{String Functions@{String Functions}!flush@{flush}}
\index{flush@{flush}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{flush()}{flush()}}
{\footnotesize\ttfamily nothing Qore\+::flush (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Flushes output to the console output with \mbox{\hyperlink{group__string__functions_ga996c5d1686fbc245f0bc7a02012e6a33}{print()}}, \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf()}}, etc. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_ga56e62bf88b3fa54aa9aa75508d5d6c05}{flush}}();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gae583afd778a92a7b2a3027383fd75ed4}\label{group__string__functions_gae583afd778a92a7b2a3027383fd75ed4}} 
\index{String Functions@{String Functions}!force\+\_\+encoding@{force\+\_\+encoding}}
\index{force\+\_\+encoding@{force\+\_\+encoding}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{force\+\_\+encoding()}{force\_encoding()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::force\+\_\+encoding (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})}



Returns the first string argument tagged with the character encoding given as the second argument; does not actually change the string data. 

Use only in the case that a string is tagged with the wrong encoding, for example, if a string from a \mbox{\hyperlink{class_qore_1_1_file}{File}} object has a different encoding than the \mbox{\hyperlink{class_qore_1_1_file}{File}} object.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to be returned \\
\hline
{\em encoding} & the encoding to tag the return value with\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the first string argument tagged with the character encoding given as the second argument; does not actually change the string data
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string nstr = \mbox{\hyperlink{group__string__functions_gae583afd778a92a7b2a3027383fd75ed4}{force\_encoding}}(str, \textcolor{stringliteral}{"iso-8859-1"});
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gaaf459e46d453147d330083e2680823dd}\label{group__string__functions_gaaf459e46d453147d330083e2680823dd}} 
\index{String Functions@{String Functions}!force\+\_\+encoding@{force\+\_\+encoding}}
\index{force\+\_\+encoding@{force\+\_\+encoding}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{force\+\_\+encoding()}{force\_encoding()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::force\+\_\+encoding (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga33bb08516773ed10def16bb42d6b8159}\label{group__string__functions_ga33bb08516773ed10def16bb42d6b8159}} 
\index{String Functions@{String Functions}!format\+\_\+number@{format\+\_\+number}}
\index{format\+\_\+number@{format\+\_\+number}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{format\+\_\+number()}{format\_number()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::format\+\_\+number (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt,  }\item[{softfloat}]{num }\end{DoxyParamCaption})}



Returns a string of a formatted number according to a number argument and a format string. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the format string has the following format\+:~\newline
 {\itshape $<$thousands\+\_\+separator$>$}{\ttfamily \mbox{[}}{\itshape $<$decimal\+\_\+separator$>$\mbox{[}$<$decimals$>$\mbox{]}}{\ttfamily \mbox{]}}~\newline
 where\+:~\newline

\begin{DoxyItemize}
\item {\itshape thousands\+\_\+separator} and {\itshape decimal\+\_\+separator} are single characters defining the thousands and decimal separator characters respectively, and
\item {\itshape decimals} is one or more digits defining how may decimals should appear after the decimal point 
\end{DoxyItemize}\\
\hline
{\em num} & the number to format\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string of a formatted number according to a number argument and a format string; if the format string does not follow the given format, then the number without formatting is returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string nstr = \mbox{\hyperlink{group__string__functions_ga33bb08516773ed10def16bb42d6b8159}{format\_number}}(\textcolor{stringliteral}{".,3"}, -48392093894.2349); \textcolor{comment}{# returns "-48.392.093.894,235"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1zzz8floatzzz9_a456f92c6ee27c0c772223745f918bcbc}{Qore\+::zzz8floatzzz9\+::format()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_gaa03f03e0fe8bc5aaeb9bee8fb35b01f2}\label{group__string__functions_gaa03f03e0fe8bc5aaeb9bee8fb35b01f2}} 
\index{String Functions@{String Functions}!format\+\_\+number@{format\+\_\+number}}
\index{format\+\_\+number@{format\+\_\+number}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{format\+\_\+number()}{format\_number()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::format\+\_\+number (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gac4a81651e374644e697e3ce61c373694}\label{group__string__functions_gac4a81651e374644e697e3ce61c373694}} 
\index{String Functions@{String Functions}!get\+\_\+encoding@{get\+\_\+encoding}}
\index{get\+\_\+encoding@{get\+\_\+encoding}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{get\+\_\+encoding()}{get\_encoding()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::get\+\_\+encoding (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str }\end{DoxyParamCaption})}



Returns a string describing the character encoding of the string argument passed. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to get the encoding for\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string describing the character encoding of the string argument passed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string enc = \mbox{\hyperlink{group__string__functions_gac4a81651e374644e697e3ce61c373694}{get\_encoding}}(str);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a5a6d55ea5951eb254eb8c8a1d895937b}{Qore\+::zzz8stringzzz9\+::encoding()}} 
\end{DoxyNote}
\mbox{\Hypertarget{group__string__functions_ga800639b45a2c9b2f0e6effc687a52097}\label{group__string__functions_ga800639b45a2c9b2f0e6effc687a52097}} 
\index{String Functions@{String Functions}!get\+\_\+encoding@{get\+\_\+encoding}}
\index{get\+\_\+encoding@{get\+\_\+encoding}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{get\+\_\+encoding()}{get\_encoding()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::get\+\_\+encoding (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gadaea9cfa0f698a6fb0650f70cf8d929e}\label{group__string__functions_gadaea9cfa0f698a6fb0650f70cf8d929e}} 
\index{String Functions@{String Functions}!index@{index}}
\index{index@{index}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{index()}{index()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::index (\begin{DoxyParamCaption}\item[{softstring}]{str,  }\item[{softstring}]{substr,  }\item[{softint}]{pos = {\ttfamily 0} }\end{DoxyParamCaption})}



Retrieves the character position of a substring within a string. 

The {\itshape pos} argument and the return value are in character positions; byte offsets may differ from the character offsets with multi-\/byte \mbox{\hyperlink{character_encoding}{character encodings}}.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to search in \\
\hline
{\em substr} & the substring to find in {\itshape str}; if the \mbox{\hyperlink{character_encoding}{character encoding}} of this string does not match {\itshape str}, then it will be converted to {\itshape str}\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}} before processing \\
\hline
{\em pos} & the starting character position for the search\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the character position of a substring within a string, -\/1 is returned if the substring is not found
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int i = \mbox{\hyperlink{group__string__functions_gadaea9cfa0f698a6fb0650f70cf8d929e}{index}}(str, substr);
\textcolor{keywordflow}{if} (i == -1)
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"could not find %y in %y\(\backslash\)n"}, substr, str);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}} and an error occurs during encoding conversion \\
\hline
{\em I\+N\+V\+A\+L\+I\+D-\/\+E\+N\+C\+O\+D\+I\+NG} & this exception could be thrown if a character offset calculation fails due to invalid encoding of multi-\/byte character data\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a53392adad0eab1542d3d8bc9c91da89c}{Qore\+::zzz8stringzzz9\+::find(softstring, softint)}}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_af2463dc9c06ba8318b7030f040cfa85d}{Qore\+::zzz8stringzzz9\+::rfind(softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_ga55663008aa59489b869e558b29c7c22d}{rindex(softstring, softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_ga1f5360410dc63441327daf2af65b9270}{bindex(softstring, softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_ga123df73fe420500294a26163371fb175}{brindex(softstring, softstring, softint)}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_gab2ccb59779f7860a4e67af5b5a3bc766}\label{group__string__functions_gab2ccb59779f7860a4e67af5b5a3bc766}} 
\index{String Functions@{String Functions}!index@{index}}
\index{index@{index}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{index()}{index()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::index (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga2470edb3a13437c060ec85e7653e022a}\label{group__string__functions_ga2470edb3a13437c060ec85e7653e022a}} 
\index{String Functions@{String Functions}!join@{join}}
\index{join@{join}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{join()}{join()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::join (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{}]{... }\end{DoxyParamCaption})}



Creates a string from separator string and a list of arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the separator string \\
\hline
{\em ...} & the list of arguments to join; each argument will be converted to a string if necessary to be concatenated to the return value string; additionally if any string argument has a different \mbox{\hyperlink{character_encoding}{character encoding}} than {\itshape str}, then it will be converted to {\itshape str}\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}} before concatentation to the return value string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string created from a list and a seperator string, each element in the list will be present in the return value separated by the separator string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = \mbox{\hyperlink{group__string__functions_ga2470edb3a13437c060ec85e7653e022a}{join}}(\textcolor{stringliteral}{":"}, \textcolor{stringliteral}{"a"}, \textcolor{stringliteral}{"b"}, \textcolor{stringliteral}{"c"}); \textcolor{comment}{# returns "a:b:c"}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}} and an error occurs during encoding conversion \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__string__functions_ga07a2c7b7cc0f2139f75330815d45007b}\label{group__string__functions_ga07a2c7b7cc0f2139f75330815d45007b}} 
\index{String Functions@{String Functions}!join@{join}}
\index{join@{join}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{join()}{join()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::join (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ auto $>$}]{l }\end{DoxyParamCaption})}



Creates a string from separator string and a list of arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the separator string \\
\hline
{\em l} & the list of arguments to join; each argument will be converted to a string if necessary to be concatenated to the return value string; additionally if any string argument has a different \mbox{\hyperlink{character_encoding}{character encoding}} than {\itshape str}, then it will be converted to {\itshape str}\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}} before concatentation to the return value string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string created from a list and a separator string, each element in the list will be present in the return value separated by the separator string; the string returned with have the same \mbox{\hyperlink{character_encoding}{character encoding}} as {\itshape str} 
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = \mbox{\hyperlink{group__string__functions_ga2470edb3a13437c060ec85e7653e022a}{join}}(\textcolor{stringliteral}{":"}, (\textcolor{stringliteral}{"a"}, \textcolor{stringliteral}{"b"}, \textcolor{stringliteral}{"c"})); \textcolor{comment}{# returns "a:b:c"}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}} and an error occurs during encoding conversion\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8listzzz9_a5cb7d0b52f91aca98030ec1926beb5c5}{Qore\+::zzz8listzzz9\+::join(string)}} 
\end{DoxyNote}
\mbox{\Hypertarget{group__string__functions_ga9354dbf44cdf06b8011eb4f1409236b8}\label{group__string__functions_ga9354dbf44cdf06b8011eb4f1409236b8}} 
\index{String Functions@{String Functions}!join@{join}}
\index{join@{join}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{join()}{join()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily nothing Qore\+::join (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga5ae69f518a47e6146bf2285a54804455}\label{group__string__functions_ga5ae69f518a47e6146bf2285a54804455}} 
\index{String Functions@{String Functions}!length@{length}}
\index{length@{length}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{length()}{length()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::length (\begin{DoxyParamCaption}\item[{softstring}]{str }\end{DoxyParamCaption})}



Returns the length in characters for the string passed. 

Note that the byte length may differ from the character length with multi-\/byte \mbox{\hyperlink{character_encoding}{character encodings}}. To get the byte length of a string, see \mbox{\hyperlink{group__string__functions_gafc530772b929b2148ae2733569bada58}{strlen()}}.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to return the character length of\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the length in characters for the string passed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int len = \mbox{\hyperlink{group__string__functions_ga5ae69f518a47e6146bf2285a54804455}{length}}(str);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item this operation has {\itshape O(n)} complexity if called on a string with a multi-\/byte \mbox{\hyperlink{character_encoding}{character encoding}}, otherwise it is {\itshape O(1)}
\item equivalent to \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a555db3550ff785af51a647415e994861}{Qore\+::zzz8stringzzz9\+::length()}}
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_gafc530772b929b2148ae2733569bada58}{strlen()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a2bd72f65b9028cc5606741a547a0fed3}{Qore\+::zzz8stringzzz9\+::strlen()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_ab4a8ecb725765ecd184f9d2cbd411c5c}{Qore\+::zzz8stringzzz9\+::size()}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga4bb7464900907fdeca6696c31944758e}\label{group__string__functions_ga4bb7464900907fdeca6696c31944758e}} 
\index{String Functions@{String Functions}!length@{length}}
\index{length@{length}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{length()}{length()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::length (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin }\end{DoxyParamCaption})}



Returns the number of bytes in the binary object passed as an argument. 

This variant of the function accepting a binary object as an argument works identically to the \mbox{\hyperlink{operators_elements}{elements operator}}

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em bin} & the binary object to return the size of\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the number of bytes in the binary object
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int nbytes = \mbox{\hyperlink{group__string__functions_ga5ae69f518a47e6146bf2285a54804455}{length}}(bin);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga46649277a74fa0dfc28f0125fcbfe7e5}\label{group__string__functions_ga46649277a74fa0dfc28f0125fcbfe7e5}} 
\index{String Functions@{String Functions}!length@{length}}
\index{length@{length}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{length()}{length()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily nothing Qore\+::length (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga9792aac3fb720e90180f5c6b517852e3}\label{group__string__functions_ga9792aac3fb720e90180f5c6b517852e3}} 
\index{String Functions@{String Functions}!length@{length}}
\index{length@{length}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{length()}{length()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::length (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gaa3c396510f9d106aee5161cbb144e163}\label{group__string__functions_gaa3c396510f9d106aee5161cbb144e163}} 
\index{String Functions@{String Functions}!ltrim@{ltrim}}
\index{ltrim@{ltrim}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{ltrim()}{ltrim()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::ltrim (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{chars }\end{DoxyParamCaption})}



Removes byte characters from the start of a string and returns the new string. 

By default (if the second argument is omitted or passed as an empty string) the following whitespace byte characters are removed\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character). To trim other characters, pass a string as the second argument specifying the byte characters to be removed.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to trim \\
\hline
{\em chars} & the characters to trim from the start of the string (default\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character))\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the trimmed string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string tstr = \mbox{\hyperlink{group__string__functions_gaa3c396510f9d106aee5161cbb144e163}{ltrim}}(\textcolor{stringliteral}{" ABC "});
\textcolor{comment}{# returns string "ABC "}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga51cd422758d497338d9fe3aa1c9e3510}\label{group__string__functions_ga51cd422758d497338d9fe3aa1c9e3510}} 
\index{String Functions@{String Functions}!ltrim@{ltrim}}
\index{ltrim@{ltrim}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{ltrim()}{ltrim()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::ltrim (\begin{DoxyParamCaption}\item[{reference$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$}]{str,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{chars }\end{DoxyParamCaption})}



Removes byte characters from the start of a reference to an lvalue containing a string and returns string after processing. 

By default (if the second argument is omitted or passed as an empty string) the following whitespace byte characters are removed\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character). To trim other characters, pass a string as the second argument specifying the byte characters to be removed.

This variant accepts variable references, in which case it will modify the string in place and also return the modified string.


\begin{DoxyParams}{Parameters}
{\em str} & a reference to an lvalue containing the string value to process; if the lvalue does not have a string value \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned \\
\hline
{\em chars} & the characters to trim from the start of the string (default\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character))\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the trimmed string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_gaa3c396510f9d106aee5161cbb144e163}{ltrim}}(\(\backslash\)str);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gab1aedfc4b3b7aed6dffead7e46c72b07}\label{group__string__functions_gab1aedfc4b3b7aed6dffead7e46c72b07}} 
\index{String Functions@{String Functions}!ord@{ord}}
\index{ord@{ord}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{ord()}{ord()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::ord (\begin{DoxyParamCaption}\item[{softstring}]{str,  }\item[{softint}]{offset = {\ttfamily 0} }\end{DoxyParamCaption})}



Gives the positive numeric value of the given byte in the string passed; if no string is passed or the offset is after the end of the string, -\/1 is returned. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string containing the byte to be retrieved \\
\hline
{\em offset} & the byte offset of the byte to be retrieved\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the positive numeric value of the given byte in the string passed; if the offset is after the end of the string or negative, -\/1 is returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int i = \mbox{\hyperlink{group__string__functions_gab1aedfc4b3b7aed6dffead7e46c72b07}{ord}}(str);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
\mbox{\hyperlink{group__string__functions_gab1aedfc4b3b7aed6dffead7e46c72b07}{ord()}} only works on byte offsets and returns byte values 
\end{DoxyNote}
\mbox{\Hypertarget{group__string__functions_gab998e345a65c1e98ca9370c3a324f9cb}\label{group__string__functions_gab998e345a65c1e98ca9370c3a324f9cb}} 
\index{String Functions@{String Functions}!ord@{ord}}
\index{ord@{ord}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{ord()}{ord()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::ord (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga774b6d0f9d5835de7d7362400aa2cdd1}\label{group__string__functions_ga774b6d0f9d5835de7d7362400aa2cdd1}} 
\index{String Functions@{String Functions}!parse\+\_\+boolean@{parse\+\_\+boolean}}
\index{parse\+\_\+boolean@{parse\+\_\+boolean}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{parse\+\_\+boolean()}{parse\_boolean()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily bool Qore\+::parse\+\_\+boolean (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str }\end{DoxyParamCaption})}



tries to parse a string value as a boolean 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
bool b = \mbox{\hyperlink{group__string__functions_ga774b6d0f9d5835de7d7362400aa2cdd1}{parse\_boolean}}(str);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & case-\/insensitive {\ttfamily \char`\"{}on\char`\"{}}, {\ttfamily \char`\"{}true\char`\"{}}, {\ttfamily \char`\"{}enable$\ast$\char`\"{}}, {\ttfamily \char`\"{}yes\char`\"{}}, {\ttfamily \char`\"{}y\char`\"{}} are \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}, the rest is interpreted as a number where 0 is \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}, everything else is \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a boolean value according to the parsed argument
\end{DoxyReturn}
\begin{DoxySince}{Since}
\mbox{\hyperlink{namespace_qore}{Qore}} 0.\+8.\+12 {\ttfamily \char`\"{}y\char`\"{}} is also parsed as \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga8298a57727b58a941a736c9894ce40c6}\label{group__string__functions_ga8298a57727b58a941a736c9894ce40c6}} 
\index{String Functions@{String Functions}!parse\+\_\+boolean@{parse\+\_\+boolean}}
\index{parse\+\_\+boolean@{parse\+\_\+boolean}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{parse\+\_\+boolean()}{parse\_boolean()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily bool Qore\+::parse\+\_\+boolean (\begin{DoxyParamCaption}\item[{any}]{val }\end{DoxyParamCaption})}



returns the first value passed as a boolean 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
bool b = \mbox{\hyperlink{group__string__functions_ga774b6d0f9d5835de7d7362400aa2cdd1}{parse\_boolean}}(i);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em val} & the value to convert to a boolean\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the first value passed as a boolean 
\end{DoxyReturn}
\mbox{\Hypertarget{group__string__functions_gad09a541dcd0e0f42a0447c92a7a60d36}\label{group__string__functions_gad09a541dcd0e0f42a0447c92a7a60d36}} 
\index{String Functions@{String Functions}!parse\+\_\+float@{parse\+\_\+float}}
\index{parse\+\_\+float@{parse\+\_\+float}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{parse\+\_\+float()}{parse\_float()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{float}} Qore\+::parse\+\_\+float (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt }\end{DoxyParamCaption})}



returns a floating-\/point value corresponding to a string representing the number and an argument giving the format 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
float f = \mbox{\hyperlink{group__string__functions_gad09a541dcd0e0f42a0447c92a7a60d36}{parse\_float}}(\textcolor{stringliteral}{"1.150.200,55"}, \textcolor{stringliteral}{".,"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to parse \\
\hline
{\em fmt} & the format of the number in the string, consisting of two characters, the first for the thousands separator, the second for the decimal point (ex\+: {\ttfamily \char`\"{}.,\char`\"{}} for many European locales)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the floating-\/point value represented by the string
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_ga0024906d05096f7f8c1130396dde53c7}{parse\+\_\+number()}}
\item \mbox{\hyperlink{group__string__functions_gac63ded32a4a0217e954935848210808e}{parse\+\_\+int()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+11.\+1 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_gac63ded32a4a0217e954935848210808e}\label{group__string__functions_gac63ded32a4a0217e954935848210808e}} 
\index{String Functions@{String Functions}!parse\+\_\+int@{parse\+\_\+int}}
\index{parse\+\_\+int@{parse\+\_\+int}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{parse\+\_\+int()}{parse\_int()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::parse\+\_\+int (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt }\end{DoxyParamCaption})}



returns an integer corresponding to a string representing the number and an argument giving the format 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int i = \mbox{\hyperlink{group__string__functions_gac63ded32a4a0217e954935848210808e}{parse\_int}}(\textcolor{stringliteral}{"1.150.200,55"}, \textcolor{stringliteral}{".,"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to parse \\
\hline
{\em fmt} & the format of the number in the string, consisting of two characters, the first for the thousands separator, the second for the decimal point (ex\+: {\ttfamily \char`\"{}.,\char`\"{}} for many European locales)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the number value represented by the string
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_ga0024906d05096f7f8c1130396dde53c7}{parse\+\_\+number()}}
\item \mbox{\hyperlink{group__string__functions_gad09a541dcd0e0f42a0447c92a7a60d36}{parse\+\_\+float()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga0024906d05096f7f8c1130396dde53c7}\label{group__string__functions_ga0024906d05096f7f8c1130396dde53c7}} 
\index{String Functions@{String Functions}!parse\+\_\+number@{parse\+\_\+number}}
\index{parse\+\_\+number@{parse\+\_\+number}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{parse\+\_\+number()}{parse\_number()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number}} Qore\+::parse\+\_\+number (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt }\end{DoxyParamCaption})}



returns a number corresponding to the string and the argument, giving the format 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
number n = \mbox{\hyperlink{group__string__functions_ga0024906d05096f7f8c1130396dde53c7}{parse\_number}}(\textcolor{stringliteral}{"1.150.200,55"}, \textcolor{stringliteral}{".,"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to parse \\
\hline
{\em fmt} & the format of the number in the string, consisting of two characters, the first for the thousands separator, the second for the decimal point (ex\+: {\ttfamily \char`\"{}.,\char`\"{}} for many European locales)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the number value represented by the string
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_gac63ded32a4a0217e954935848210808e}{parse\+\_\+int()}}
\item \mbox{\hyperlink{group__string__functions_gad09a541dcd0e0f42a0447c92a7a60d36}{parse\+\_\+float()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+11.\+1 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga996c5d1686fbc245f0bc7a02012e6a33}\label{group__string__functions_ga996c5d1686fbc245f0bc7a02012e6a33}} 
\index{String Functions@{String Functions}!print@{print}}
\index{print@{print}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{print()}{print()}}
{\footnotesize\ttfamily nothing Qore\+::print (\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})}



Outputs a string to standard output with no formatting. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em ...} & each of the arguments passed to this function will be output literally with no output formatting\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_ga996c5d1686fbc245f0bc7a02012e6a33}{print}}(\textcolor{stringliteral}{"hello\(\backslash\)n"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf()}} for a function that allows for formatted output 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}\label{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}} 
\index{String Functions@{String Functions}!printf@{printf}}
\index{printf@{printf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{printf()}{printf()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::printf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}



Outputs the string passed to standard output, using the first argument as a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}; does not enforce field widths on arguments larger than the given field width. 

This function will not truncate output longer than any field width given in the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} \\
\hline
{\em ...} & the argument(s) corresponding to format specifiers in the format string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the formatted string output corresponding to the arguments given
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%5s"}, \textcolor{stringliteral}{"a long string"}); \textcolor{comment}{# will print out "a long string"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_string_formatting}{String Formatting}} for information on the formatting \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}
\item \mbox{\hyperlink{group__string__functions_ga4aeb0ae8aaf5cae9c3a4dfde8e8d92be}{f\+\_\+printf()}} for a similar function that enforces field widths 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_gafa558d5962543431e9d3f872c481693a}\label{group__string__functions_gafa558d5962543431e9d3f872c481693a}} 
\index{String Functions@{String Functions}!printf@{printf}}
\index{printf@{printf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{printf()}{printf()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::printf (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga7804f63df9b181e0bacb465eb912feb9}\label{group__string__functions_ga7804f63df9b181e0bacb465eb912feb9}} 
\index{String Functions@{String Functions}!regex@{regex}}
\index{regex@{regex}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{regex()}{regex()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily bool Qore\+::regex (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{regex,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{options = {\ttfamily 0} }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the regular expression matches the string passed, otherwise returns \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}. 

Strings are converted to U\+T\+F-\/8 for pattern-\/matching; if any invalid encodings are encountered, an E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR is raised

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to test \\
\hline
{\em regex} & the regular expression pattern \\
\hline
{\em options} & regular expression options; see \mbox{\hyperlink{group__regex__constants}{Regular Expression Constants}} for possible values\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the regular expression matches the string passed, otherwise returns \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
bool b = \mbox{\hyperlink{group__string__functions_ga7804f63df9b181e0bacb465eb912feb9}{regex}}(\textcolor{stringliteral}{"hello"}, \textcolor{stringliteral}{"^hel"}); \textcolor{comment}{# returns True}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em R\+E\+G\+E\+X-\/\+C\+O\+M\+P\+I\+L\+A\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & There was an error compiling the regular expression \\
\hline
{\em R\+E\+G\+E\+X-\/\+O\+P\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & the option argument contains invalid option bits \\
\hline
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if an encoding error is encountered when converting the given strings to U\+T\+F-\/8\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a4713c0132472cf5cf6599ad9517cdc5f}{Qore\+::zzz8stringzzz9\+::regex(string, int)}}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{qore_regex}{Regular Expressions}} for more information about regular expression support in \mbox{\hyperlink{namespace_qore}{Qore}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_gab17427299ed00ee52d90beadc55ba608}\label{group__string__functions_gab17427299ed00ee52d90beadc55ba608}} 
\index{String Functions@{String Functions}!regex@{regex}}
\index{regex@{regex}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{regex()}{regex()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::regex (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga9f8c21f961daa29578dcfd596f5871ff}\label{group__string__functions_ga9f8c21f961daa29578dcfd596f5871ff}} 
\index{String Functions@{String Functions}!regex\+\_\+extract@{regex\+\_\+extract}}
\index{regex\+\_\+extract@{regex\+\_\+extract}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{regex\+\_\+extract()}{regex\_extract()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$$\ast$\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}$>$ Qore\+::regex\+\_\+extract (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{regex,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{options = {\ttfamily 0} }\end{DoxyParamCaption})}



Returns a list of substrings in a string based on matching patterns defined by a regular expression. 

Strings are converted to U\+T\+F-\/8 for pattern-\/matching; if any invalid encodings are encountered, an E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR is raised

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to process \\
\hline
{\em regex} & the regular expression to use for matching, elements should be given in parentheses \\
\hline
{\em options} & regular expression options; see \mbox{\hyperlink{group__regex__constants}{Regular Expression Constants}} for possible values\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a list of substrings in a string based on matching patterns defined by a regular expression or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} if no match was made
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*list<*string> rv = \mbox{\hyperlink{group__string__functions_ga9f8c21f961daa29578dcfd596f5871ff}{regex\_extract}}(\textcolor{stringliteral}{"ns:element"}, \textcolor{stringliteral}{"(\(\backslash\)\(\backslash\)w+):(\(\backslash\)\(\backslash\)w+)"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em R\+E\+G\+E\+X-\/\+C\+O\+M\+P\+I\+L\+A\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & There was an error compiling the regular expression \\
\hline
{\em R\+E\+G\+E\+X-\/\+O\+P\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & the option argument contains invalid option bits \\
\hline
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if an encoding error is encountered when converting the given strings to U\+T\+F-\/8\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
equivalent \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_aeaf99b23a4de2db748a1fe0bbc3811f5}{Qore\+::zzz8stringzzz9\+::regex\+Extract(string, int)}}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{qore_regex}{Regular Expressions}} for more information about regular expression support in \mbox{\hyperlink{namespace_qore}{Qore}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 this function accepts the \mbox{\hyperlink{group__regex__constants_gaea655c36090c9f1e6bb24cb8de998a04}{Qore\+::\+R\+E\+\_\+\+Global}} option to extract all occurrences of the pattern(s) in a string 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga3461a37dbd3d51bc03e58b85daae2466}\label{group__string__functions_ga3461a37dbd3d51bc03e58b85daae2466}} 
\index{String Functions@{String Functions}!regex\+\_\+extract@{regex\+\_\+extract}}
\index{regex\+\_\+extract@{regex\+\_\+extract}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{regex\+\_\+extract()}{regex\_extract()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::regex\+\_\+extract (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gad8963269da93fe1ebaa179dab8d315fa}\label{group__string__functions_gad8963269da93fe1ebaa179dab8d315fa}} 
\index{String Functions@{String Functions}!regex\+\_\+subst@{regex\+\_\+subst}}
\index{regex\+\_\+subst@{regex\+\_\+subst}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{regex\+\_\+subst()}{regex\_subst()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::regex\+\_\+subst (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{regex,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{subst,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{options = {\ttfamily 0} }\end{DoxyParamCaption})}



Returns a string with patterns substituted according to the arguments passed. 

Strings are converted to U\+T\+F-\/8 for pattern-\/matching; if any invalid encodings are encountered, an E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR is raised

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the source string for substitution \\
\hline
{\em regex} & the regular expression pattern string \\
\hline
{\em subst} & the pattern for substitution; use {\ttfamily \$1}, {\ttfamily \$2}, etc for patterns in parentheses in the {\itshape regex} argument \\
\hline
{\em options} & regular expression options; see \mbox{\hyperlink{group__regex__constants}{Regular Expression Constants}} for possible values\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string with patterns substituted according to the arguments passed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_gad8963269da93fe1ebaa179dab8d315fa}{regex\_subst}}(\textcolor{stringliteral}{"hello there"}, \textcolor{stringliteral}{"^(.*) there$"}, \textcolor{stringliteral}{"you $1"}); \textcolor{comment}{#returns "you hello"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyParagraph}{Example of global replacement\+:}

\begin{DoxyCode}
string content = \textcolor{stringliteral}{"123}
\textcolor{stringliteral}{123}
\textcolor{stringliteral}{123";}
\textcolor{stringliteral}{}
\textcolor{stringliteral}{\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}("%s\(\backslash\)n"}, \mbox{\hyperlink{group__string__functions_gad8963269da93fe1ebaa179dab8d315fa}{regex\_subst}}(content, \textcolor{stringliteral}{"123"}, \textcolor{stringliteral}{"456"}, Qore::RE\_Global));

resulting \textcolor{keywordflow}{in}:
456
456
456
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em R\+E\+G\+E\+X-\/\+C\+O\+M\+P\+I\+L\+A\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & There was an error compiling the regular expression \\
\hline
{\em R\+E\+G\+E\+X-\/\+O\+P\+T\+I\+O\+N-\/\+E\+R\+R\+OR} & the option argument contains invalid option bits \\
\hline
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if an encoding error is encountered when converting the given strings to U\+T\+F-\/8\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_ga757f5b4682cb6787e7e186ddcc2b2b56}{replace()}}
\item \mbox{\hyperlink{qore_regex}{Regular Expressions}} for more information about regular expression support in \mbox{\hyperlink{namespace_qore}{Qore}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_gaaf6eccd667d478b31ce20cde7556491f}\label{group__string__functions_gaaf6eccd667d478b31ce20cde7556491f}} 
\index{String Functions@{String Functions}!regex\+\_\+subst@{regex\+\_\+subst}}
\index{regex\+\_\+subst@{regex\+\_\+subst}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{regex\+\_\+subst()}{regex\_subst()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::regex\+\_\+subst (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga757f5b4682cb6787e7e186ddcc2b2b56}\label{group__string__functions_ga757f5b4682cb6787e7e186ddcc2b2b56}} 
\index{String Functions@{String Functions}!replace@{replace}}
\index{replace@{replace}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{replace()}{replace()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::replace (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{source,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{target,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{start = {\ttfamily 0},  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{end = {\ttfamily -\/1} }\end{DoxyParamCaption})}



Replaces all occurrences of a substring in a string with another string. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to process \\
\hline
{\em source} & the substring to replace; if this string has a different \mbox{\hyperlink{character_encoding}{character encoding}} than {\itshape str}, then it will be converted to {\itshape str}\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}} \\
\hline
{\em target} & the replacement value for {\itshape source}; if this string has a different \mbox{\hyperlink{character_encoding}{character encoding}} than {\itshape str}, then it will be converted to {\itshape str}\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}} \\
\hline
{\em start} & the starting character position in the source for the replacement where the first character is at position 0 (may not be the same as the byte position for multibyte \mbox{\hyperlink{character_encoding}{character encodings}}); negative numbers give character offsets from the end of the string \\
\hline
{\em end} & the ending character position in the source for the replacement where the first character is at position 0 (may not be the same as the byte position for multibyte \mbox{\hyperlink{character_encoding}{character encodings}}; negative numbers give offsets from the end of the string)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string with all occurrences of {\itshape source} replaced with {\itshape target} 
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = \mbox{\hyperlink{group__string__functions_ga757f5b4682cb6787e7e186ddcc2b2b56}{replace}}(\textcolor{stringliteral}{"hello there"}, \textcolor{stringliteral}{"there"}, \textcolor{stringliteral}{"you"}); \textcolor{comment}{# returns "hello you"}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}} and an error occurs during encoding conversion\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
no regular expressions are used in this function, only direct replacements
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__string__functions_gad8963269da93fe1ebaa179dab8d315fa}{regex\+\_\+subst()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga18db5008b245ff4346386a107b19b2ba}\label{group__string__functions_ga18db5008b245ff4346386a107b19b2ba}} 
\index{String Functions@{String Functions}!replace@{replace}}
\index{replace@{replace}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{replace()}{replace()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::replace (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga1a77feb53e86b659be6d9eea7d3618e8}\label{group__string__functions_ga1a77feb53e86b659be6d9eea7d3618e8}} 
\index{String Functions@{String Functions}!reverse@{reverse}}
\index{reverse@{reverse}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{reverse()}{reverse()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::reverse (\begin{DoxyParamCaption}\item[{softstring}]{str }\end{DoxyParamCaption})}



Reverses a string and returns the new string. 

Works properly on strings with multi-\/byte \mbox{\hyperlink{character_encoding}{character encodings}} as well (such as U\+T\+F-\/8)

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to reverse\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string with all characters in reverse order
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string ns = \mbox{\hyperlink{group__string__functions_ga1a77feb53e86b659be6d9eea7d3618e8}{reverse}}(str);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
reverse(list) 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga55663008aa59489b869e558b29c7c22d}\label{group__string__functions_ga55663008aa59489b869e558b29c7c22d}} 
\index{String Functions@{String Functions}!rindex@{rindex}}
\index{rindex@{rindex}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{rindex()}{rindex()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::rindex (\begin{DoxyParamCaption}\item[{softstring}]{str,  }\item[{softstring}]{substr,  }\item[{softint}]{pos = {\ttfamily -\/1} }\end{DoxyParamCaption})}



Retrieves the character position of a substring within a string, starting the search from the end of the string. 

The {\itshape pos} argument and the return value are in character positions; byte offsets may differ from the character offsets with multi-\/byte \mbox{\hyperlink{character_encoding}{character encodings}}.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to search in \\
\hline
{\em substr} & the substring to find in {\itshape str}; if the \mbox{\hyperlink{character_encoding}{character encoding}} of this string does not match {\itshape str}, then it will be converted to {\itshape str}\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}} before processing \\
\hline
{\em pos} & the starting character position for the search, -\/1 means start from the end of the string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the character position of a substring within a string, -\/1 is returned if the substring is not found
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int i = \mbox{\hyperlink{group__string__functions_ga55663008aa59489b869e558b29c7c22d}{rindex}}(str, substr);
\textcolor{keywordflow}{if} (i == -1)
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"could not find %y in %y\(\backslash\)n"}, substr, str);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}} and an error occurs during encoding conversion \\
\hline
{\em I\+N\+V\+A\+L\+I\+D-\/\+E\+N\+C\+O\+D\+I\+NG} & this exception could be thrown if a character offset calculation fails due to invalid encoding of multi-\/byte character data\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_af2463dc9c06ba8318b7030f040cfa85d}{Qore\+::zzz8stringzzz9\+::rfind(softstring, softint)}}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a53392adad0eab1542d3d8bc9c91da89c}{Qore\+::zzz8stringzzz9\+::find(softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_gadaea9cfa0f698a6fb0650f70cf8d929e}{index(softstring, softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_ga1f5360410dc63441327daf2af65b9270}{bindex(softstring, softstring, softint)}}
\item \mbox{\hyperlink{group__string__functions_ga123df73fe420500294a26163371fb175}{brindex(softstring, softstring, softint)}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga390f6c11ecc55c179293de8e87605d2f}\label{group__string__functions_ga390f6c11ecc55c179293de8e87605d2f}} 
\index{String Functions@{String Functions}!rindex@{rindex}}
\index{rindex@{rindex}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{rindex()}{rindex()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::rindex (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga25264bfb9950ac66862db9b4a32eeee8}\label{group__string__functions_ga25264bfb9950ac66862db9b4a32eeee8}} 
\index{String Functions@{String Functions}!rtrim@{rtrim}}
\index{rtrim@{rtrim}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{rtrim()}{rtrim()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::rtrim (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{chars }\end{DoxyParamCaption})}



Removes byte characters from the end of a string and returns the new string. 

By default (if the second argument is omitted or passed as an empty string) the following whitespace byte characters are removed\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character). To trim other characters, pass a string as the second argument specifying the byte characters to be removed.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to trim \\
\hline
{\em chars} & the characters to trim from the end of the string (default\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character))\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the trimmed string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string tstr = \mbox{\hyperlink{group__string__functions_ga25264bfb9950ac66862db9b4a32eeee8}{rtrim}}(str);
\textcolor{comment}{# returns string " ABC"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyRefDesc}{Bug}
\item[\mbox{\hyperlink{bug__bug000003}{Bug}}]it is not possible to trim multi-\/byte characters from strings using this function; each byte is treated as a character. No encoding conversions are done even if the {\itshape chars} argument has a different \mbox{\hyperlink{character_encoding}{character encoding}} than the {\itshape str} argument. \end{DoxyRefDesc}
\mbox{\Hypertarget{group__string__functions_gaf46773aba9e3ea83b31c60ae0bc22c73}\label{group__string__functions_gaf46773aba9e3ea83b31c60ae0bc22c73}} 
\index{String Functions@{String Functions}!rtrim@{rtrim}}
\index{rtrim@{rtrim}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{rtrim()}{rtrim()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::rtrim (\begin{DoxyParamCaption}\item[{reference$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$}]{str,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{chars }\end{DoxyParamCaption})}



Removes byte characters from the end of a reference to an lvalue containing a string and returns string after processing. 

By default (if the second argument is omitted or passed as an empty string) the following whitespace byte characters are removed\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character). To trim other characters, pass a string as the second argument specifying the byte characters to be removed.

This variant accepts variable references, in which case it will modify the string in place and also return the modified string.


\begin{DoxyParams}{Parameters}
{\em str} & a reference to an lvalue containing the string value to process; if the lvalue does not have a string value \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned \\
\hline
{\em chars} & the characters to trim from the end of the string (default\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character))\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the trimmed string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_ga25264bfb9950ac66862db9b4a32eeee8}{rtrim}}(\(\backslash\)str);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyRefDesc}{Bug}
\item[\mbox{\hyperlink{bug__bug000004}{Bug}}]it is not possible to trim multi-\/byte characters from strings using this function; each byte is treated as a character. No encoding conversions are done even if the {\itshape chars} argument has a different \mbox{\hyperlink{character_encoding}{character encoding}} than the {\itshape str} argument. \end{DoxyRefDesc}
\mbox{\Hypertarget{group__string__functions_ga3b0ca637686a083710559ab70be0ec19}\label{group__string__functions_ga3b0ca637686a083710559ab70be0ec19}} 
\index{String Functions@{String Functions}!split@{split}}
\index{split@{split}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{split()}{split()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}$>$ Qore\+::split (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sep,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{bool}]{with\+\_\+separator = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}} }\end{DoxyParamCaption})}



Splits a string into a list of components based on a separator string. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em sep} & the separator string; if the separator string is not found in the string to split, then a list with only one element containing the entire string argument is returned\textquotesingle{}; if this string has a different \mbox{\hyperlink{character_encoding}{character encoding}} than {\itshape str}, then it will be converted to {\itshape str}\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}} \\
\hline
{\em str} & the string to split \\
\hline
{\em with\+\_\+separator} & include the separator string in every element\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a list of each component of a string separated by a separator string, with the separator removed; the separator pattern will not be included in the elements of the list returned unless the {\itshape with\+\_\+separator} argument is \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<string> l = \mbox{\hyperlink{group__string__functions_ga3b0ca637686a083710559ab70be0ec19}{split}}(\textcolor{stringliteral}{":"}, \textcolor{stringliteral}{"some:text:here"}); \textcolor{comment}{# returns ("some", "text", "here")}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}} and an error occurs during encoding conversion\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_afe181b134b4aff3851e3dcb02b9cf7c4}{Qore\+::zzz8stringzzz9\+::split(string, bool)}} 
\end{DoxyNote}
\mbox{\Hypertarget{group__string__functions_gad3db83c0fd5df500b0cc9d2ddb0e7d85}\label{group__string__functions_gad3db83c0fd5df500b0cc9d2ddb0e7d85}} 
\index{String Functions@{String Functions}!split@{split}}
\index{split@{split}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{split()}{split()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}$>$ Qore\+::split (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{sep,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{quote,  }\item[{bool}]{trim\+\_\+unquoted = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}}} }\end{DoxyParamCaption})}



Splits a string into a list of components based on a separator string and a quote character. 

The quote character can appear as the first part of a field, in which case it is assumed to designate the entire field. If instances of the quote character are found in the field preceded by a backquote character ({\ttfamily \char`\"{}\textbackslash{}\char`\"{}}), then these quote characters are included as part of the field\textquotesingle{}s text and not treated as quote characters

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em sep} & the separator string; if the separator string is not found in the string to split, then a list with only one element containing the entire string argument is returned\textquotesingle{}; if this string has a different \mbox{\hyperlink{character_encoding}{character encoding}} than {\itshape str}, then it will be converted to {\itshape str}\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}} \\
\hline
{\em str} & the string to split \\
\hline
{\em quote} & the quote character \\
\hline
{\em trim\+\_\+unquoted} & remove leading and trailing whitespace from unquoted fields\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a list of each component of a string separated by a separator string, with the separator and any enclosing quote characters removed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<string> l = \mbox{\hyperlink{group__string__functions_ga3b0ca637686a083710559ab70be0ec19}{split}}(\textcolor{stringliteral}{","}, \textcolor{stringliteral}{"some,'text with spaces',here"}, \textcolor{stringliteral}{"'"}); \textcolor{comment}{# returns ("some", "text with
       spaces", "here")}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if the string arguments have different \mbox{\hyperlink{character_encoding}{character encodings}} and an error occurs during encoding conversion \\
\hline
{\em S\+P\+L\+I\+T-\/\+E\+R\+R\+OR} & field missing closing quote character; extra text following quoted field\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
equivalent to Qore\+::zzz8stringzzz9\+::split(string, string)
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 the {\ttfamily trim\+\_\+unquoted} parameter was added 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga2230070c2f14ca70e63cf463f5d688c3}\label{group__string__functions_ga2230070c2f14ca70e63cf463f5d688c3}} 
\index{String Functions@{String Functions}!split@{split}}
\index{split@{split}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{split()}{split()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}$>$ Qore\+::split (\begin{DoxyParamCaption}\item[{data}]{sep,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{data }\end{DoxyParamCaption})}



Returns a list of binary objects representing each component of the binary object separated by the bytes identified by the separator argument, with the separator removed. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em data} & the binary object to separate \\
\hline
{\em sep} & the bytes that separate the fields\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a list of binary objects representing each component of the binary object separated by the bytes identified by the separator argument, with the separator removed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<binary> l = \mbox{\hyperlink{group__string__functions_ga3b0ca637686a083710559ab70be0ec19}{split}}(sep, bin);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8binaryzzz9_a7b9095703570b4cbbd90496367f47286}{Qore\+::zzz8binaryzzz9\+::split(data)}} 
\end{DoxyNote}
\mbox{\Hypertarget{group__string__functions_gad309b548d2cbeb77ab83d92cea49ba50}\label{group__string__functions_gad309b548d2cbeb77ab83d92cea49ba50}} 
\index{String Functions@{String Functions}!split@{split}}
\index{split@{split}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{split()}{split()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}$>$ Qore\+::split (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga7a74be141f814ef286046c367b21091c}\label{group__string__functions_ga7a74be141f814ef286046c367b21091c}} 
\index{String Functions@{String Functions}!sprintf@{sprintf}}
\index{sprintf@{sprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{sprintf()}{sprintf()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::sprintf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}



Returns a formatted string based on a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and other arguments; does not enforce field widths on arguments larger than the given field width. 

This function will not truncate output longer than any field width given in the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} \\
\hline
{\em ...} & the argument(s) corresponding to format specifiers in the format string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a formatted string corresponding to the arguments given
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = \mbox{\hyperlink{group__string__functions_ga7a74be141f814ef286046c367b21091c}{sprintf}}(\textcolor{stringliteral}{"%5s"}, \textcolor{stringliteral}{"a long string"}); \textcolor{comment}{# will return "a long string"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_string_formatting}{String Formatting}} for information on the formatting \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}
\item \mbox{\hyperlink{group__string__functions_ga859e7c350c00ade5ebeb8e2c6a3d9b1f}{f\+\_\+sprintf()}} for a similar function that enforces field widths 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_gaadd7e7a29545d6dcb6b886487cb64b18}\label{group__string__functions_gaadd7e7a29545d6dcb6b886487cb64b18}} 
\index{String Functions@{String Functions}!sprintf@{sprintf}}
\index{sprintf@{sprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{sprintf()}{sprintf()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::sprintf (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gafc530772b929b2148ae2733569bada58}\label{group__string__functions_gafc530772b929b2148ae2733569bada58}} 
\index{String Functions@{String Functions}!strlen@{strlen}}
\index{strlen@{strlen}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{strlen()}{strlen()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::strlen (\begin{DoxyParamCaption}\item[{softstring}]{str }\end{DoxyParamCaption})}



Returns the length in bytes of the string argument. 

Note that the byte length may differ from the character length with multi-\/byte \mbox{\hyperlink{character_encoding}{character encodings}}. For the character length of a string, see \mbox{\hyperlink{group__string__functions_ga5ae69f518a47e6146bf2285a54804455}{length()}}.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to return the byte length of\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the length in bytes for the string passed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int size = \mbox{\hyperlink{group__string__functions_gafc530772b929b2148ae2733569bada58}{strlen}}(str);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a2bd72f65b9028cc5606741a547a0fed3}{Qore\+::zzz8stringzzz9\+::strlen()}} and \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_ab4a8ecb725765ecd184f9d2cbd411c5c}{Qore\+::zzz8stringzzz9\+::size()}}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_ga5ae69f518a47e6146bf2285a54804455}{length()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a555db3550ff785af51a647415e994861}{Qore\+::zzz8stringzzz9\+::length()}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga3c5426eab56d284c42e16d576c241424}\label{group__string__functions_ga3c5426eab56d284c42e16d576c241424}} 
\index{String Functions@{String Functions}!strlen@{strlen}}
\index{strlen@{strlen}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{strlen()}{strlen()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily nothing Qore\+::strlen (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga79d3f37ac6e2f76c800b1a3d0db62b71}\label{group__string__functions_ga79d3f37ac6e2f76c800b1a3d0db62b71}} 
\index{String Functions@{String Functions}!strlen@{strlen}}
\index{strlen@{strlen}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{strlen()}{strlen()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::strlen (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gaabfb10141a51d31ef100d9fd3a02252e}\label{group__string__functions_gaabfb10141a51d31ef100d9fd3a02252e}} 
\index{String Functions@{String Functions}!strmul@{strmul}}
\index{strmul@{strmul}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{strmul()}{strmul()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::strmul (\begin{DoxyParamCaption}\item[{softstring}]{str,  }\item[{softint}]{smul,  }\item[{\+\_\+\+\_\+7\+\_\+ softint}]{offset }\end{DoxyParamCaption})}



Returns a new string with a repeated string element and optionally removing trailing characters. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string element to repeat in the return value string \\
\hline
{\em smul} & the number of times the element should repeat \\
\hline
{\em offset} & the number of characters that should be removed from the end of the string after processing\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string ret = \mbox{\hyperlink{group__string__functions_gaabfb10141a51d31ef100d9fd3a02252e}{strmul}}(\textcolor{stringliteral}{"%s,"}, 3, 1); \textcolor{comment}{# returns "%s,%s,%s"}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em S\+T\+R\+M\+U\+L-\/\+E\+R\+R\+OR} & {\itshape offset} is $<$ 0 or {\itshape smul} $<$ 0 \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}\label{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}} 
\index{String Functions@{String Functions}!substr@{substr}}
\index{substr@{substr}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{substr()}{substr()}\hspace{0.1cm}{\footnotesize\ttfamily [1/5]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::substr (\begin{DoxyParamCaption}\item[{softstring}]{str,  }\item[{softint}]{start }\end{DoxyParamCaption})}



Returns a portion of a string starting from an integer offset. 

Arguments can be negative, giving offsets from the end of the string. All offsets are character positions, not byte positions.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & The string to process \\
\hline
{\em start} & The starting character for the substring where the first character is at offset 0; if the offset is negative, it designates the number of characters from the end of the string. If the offset is 0, then the entire string is returned.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the substring of the string starting from an integer character offset; the rest of the string is returned after this offset; an empty string is returned if the argument cannot be satisfied
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{comment}{# get the last 10 characters of a string}
string substr = \mbox{\hyperlink{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}{substr}}(str, -10);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em I\+N\+V\+A\+L\+I\+D-\/\+E\+N\+C\+O\+D\+I\+NG} & this exception could be thrown if a character offset calculation fails due to invalid encoding of multi-\/byte character data\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_ab5ad54b1fe38b46ee071e55563d9d245}{Qore\+::zzz8stringzzz9\+::substr(softint)}} 
\end{DoxyNote}
\mbox{\Hypertarget{group__string__functions_ga7893910a0881f74365a20ec7a46014b6}\label{group__string__functions_ga7893910a0881f74365a20ec7a46014b6}} 
\index{String Functions@{String Functions}!substr@{substr}}
\index{substr@{substr}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{substr()}{substr()}\hspace{0.1cm}{\footnotesize\ttfamily [2/5]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::substr (\begin{DoxyParamCaption}\item[{softstring}]{str,  }\item[{softint}]{start,  }\item[{softint}]{len }\end{DoxyParamCaption})}



Returns a portion of a string starting from an integer offset, with a length parameter. 

Arguments can be negative, giving offsets from the end of the string. All offsets are character positions, not byte positions.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & The string to process \\
\hline
{\em start} & The starting character for the substring where the first character is at offset 0; if the offset is negative, it designates the number of characters from the end of the string \\
\hline
{\em len} & The maximum number of characters to copy; if this value is negative, the rest of the string from {\itshape start} will be copied to the substring, except without -\/ {\itshape len} characters from the end of the string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the substring of the string according to the arguments passed; an empty string is returned if the argument cannot be satisfied
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{comment}{# get a substring 10 characters into the string except omitting the last 2 characters of the string}
string substr = \mbox{\hyperlink{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}{substr}}(str, 10, -2);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em I\+N\+V\+A\+L\+I\+D-\/\+E\+N\+C\+O\+D\+I\+NG} & this exception could be thrown if a character offset calculation fails due to invalid encoding of multi-\/byte character data\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_aaa1c011bda61406af681da3d12bb57c3}{Qore\+::zzz8stringzzz9\+::substr(softint, softint)}} 
\end{DoxyNote}
\mbox{\Hypertarget{group__string__functions_ga8b90bec06c9dabd6d54fff51684f9da6}\label{group__string__functions_ga8b90bec06c9dabd6d54fff51684f9da6}} 
\index{String Functions@{String Functions}!substr@{substr}}
\index{substr@{substr}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{substr()}{substr()}\hspace{0.1cm}{\footnotesize\ttfamily [3/5]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::substr (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{b,  }\item[{softint}]{start }\end{DoxyParamCaption})}



Returns a portion of a binary object starting from an integer offset. 

Arguments can be negative, giving offsets from the end of the data.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em b} & The binary object to process \\
\hline
{\em start} & The starting byte for the portion of the binary object where the first byte is at offset 0; if the offset is negative, it designates the number of bytes from the end of the data\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the portion of the binary data argument starting from an integer byte offset; the rest of the data is returned after this offset
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{comment}{# get the last 10 bytes}
binary b1 = \mbox{\hyperlink{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}{substr}}(b, -10);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8binaryzzz9_a5b99353f309cc3cdfd0fe7227d99eee5}{Qore\+::zzz8binaryzzz9\+::substr(softint)}}
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_gaf00ab0e1f2c880e0da287c102aca9873}\label{group__string__functions_gaf00ab0e1f2c880e0da287c102aca9873}} 
\index{String Functions@{String Functions}!substr@{substr}}
\index{substr@{substr}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{substr()}{substr()}\hspace{0.1cm}{\footnotesize\ttfamily [4/5]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::substr (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{b,  }\item[{softint}]{start,  }\item[{softint}]{len }\end{DoxyParamCaption})}



Returns a portion of a binary object starting from an integer offset, with a length parameter. 

Arguments can be negative, giving offsets from the end of the data.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em b} & The binary object to process \\
\hline
{\em start} & The starting byte for the portion of the binary object where the first byte is at offset 0; if the offset is negative, it designates the number of bytes from the end of the data \\
\hline
{\em len} & The maximum number of bytes to copy; if this value is negative, the rest of the data from {\itshape start} will be copied to the return value, except without -\/ {\itshape len} bytes from the end of the data\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the portion of the binary data argument according to the arguments passed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{comment}{# get a binary object 10 characters into the data except omitting the last 2 bytes}
binary b1 = \mbox{\hyperlink{group__string__functions_gafe621446ada382d5b086a1d2a20934c9}{substr}}(b, 10, -2);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
equivalent to \mbox{\hyperlink{class_qore_1_1zzz8binaryzzz9_a87459df5b2a455d190644ae47a468791}{Qore\+::zzz8binaryzzz9\+::substr(softint, softint)}}
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga6d76c09df83d593dcb4d80b1988d1b88}\label{group__string__functions_ga6d76c09df83d593dcb4d80b1988d1b88}} 
\index{String Functions@{String Functions}!substr@{substr}}
\index{substr@{substr}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{substr()}{substr()}\hspace{0.1cm}{\footnotesize\ttfamily [5/5]}}
{\footnotesize\ttfamily nothing Qore\+::substr (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga69274a2dc60bef5acb7a8adad8b96b8b}\label{group__string__functions_ga69274a2dc60bef5acb7a8adad8b96b8b}} 
\index{String Functions@{String Functions}!tolower@{tolower}}
\index{tolower@{tolower}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{tolower()}{tolower()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::tolower (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str }\end{DoxyParamCaption})}



Returns a string in all lower-\/case characters based on the argument passed. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string lwr = \mbox{\hyperlink{group__string__functions_ga69274a2dc60bef5acb7a8adad8b96b8b}{tolower}}(str);
\end{DoxyCode}

\end{DoxyParagraph}
This function operates on a very wide range of non-\/\+A\+S\+C\+II characters using a Unicode lookup table for mapping Latin, Cyrillic, Greek, Armenian, Georgian, etc characters.


\begin{DoxyParams}{Parameters}
{\em str} & a string to process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string in all lower-\/case characters based on the argument passed
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item equivalent to Qore\+::zzz8stringzzz9\+::lwr(string)
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_ae2329c573986ede4a54e70e9ccef30e2}{Qore\+::zzz8stringzzz9\+::lwr()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a0b5c301c6742fccb8645968845b00fc1}{Qore\+::zzz8stringzzz9\+::upr()}}
\item \mbox{\hyperlink{group__string__functions_ga55350788372fc736eee9c0102ec82215}{toupper()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 this function operates on a wide range of characters and is no longer limited to A\+S\+C\+II characters 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_gaee3b0330c18a79c0a474cad90724ba26}\label{group__string__functions_gaee3b0330c18a79c0a474cad90724ba26}} 
\index{String Functions@{String Functions}!tolower@{tolower}}
\index{tolower@{tolower}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{tolower()}{tolower()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::tolower (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga55350788372fc736eee9c0102ec82215}\label{group__string__functions_ga55350788372fc736eee9c0102ec82215}} 
\index{String Functions@{String Functions}!toupper@{toupper}}
\index{toupper@{toupper}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{toupper()}{toupper()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::toupper (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str }\end{DoxyParamCaption})}



Returns a string in all upper-\/case characters based on the argument passed. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string upr = \mbox{\hyperlink{group__string__functions_ga55350788372fc736eee9c0102ec82215}{toupper}}(str);
\end{DoxyCode}

\end{DoxyParagraph}
This function operates on a very wide range of non-\/\+A\+S\+C\+II characters using a Unicode lookup table for mapping Latin, Cyrillic, Greek, Armenian, Georgian, etc characters.


\begin{DoxyParams}{Parameters}
{\em str} & a string to process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string in all upper-\/case characters based on the argument passed
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item equivalent to Qore\+::zzz8stringzzz9\+::upr(string)
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_ae2329c573986ede4a54e70e9ccef30e2}{Qore\+::zzz8stringzzz9\+::lwr()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a0b5c301c6742fccb8645968845b00fc1}{Qore\+::zzz8stringzzz9\+::upr()}}
\item \mbox{\hyperlink{group__string__functions_ga69274a2dc60bef5acb7a8adad8b96b8b}{tolower()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 this function operates on a wide range of characters and is no longer limited to A\+S\+C\+II characters 
\end{DoxySince}
\mbox{\Hypertarget{group__string__functions_ga89a2d29770895c7fc27ce3e95d657315}\label{group__string__functions_ga89a2d29770895c7fc27ce3e95d657315}} 
\index{String Functions@{String Functions}!toupper@{toupper}}
\index{toupper@{toupper}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{toupper()}{toupper()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::toupper (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gae8d314e819a299d46d181696600d4293}\label{group__string__functions_gae8d314e819a299d46d181696600d4293}} 
\index{String Functions@{String Functions}!trim@{trim}}
\index{trim@{trim}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{trim()}{trim()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::trim (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{chars }\end{DoxyParamCaption})}



Removes byte characters from the start and end of a string and returns the new string (also see the \mbox{\hyperlink{operators_trim}{trim operator}}) 

By default (if the second argument is omitted or passed as an empty string) the following whitespace byte characters are removed\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character). To trim other characters, pass a string as the second argument specifying the byte characters to be removed.

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to trim \\
\hline
{\em chars} & the characters to trim from the start and end of the string (default\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character))\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the trimmed string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string tstr = \mbox{\hyperlink{group__string__functions_gae8d314e819a299d46d181696600d4293}{trim}}(str);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gabcd44cef4eddf5659153a57bdc312db8}\label{group__string__functions_gabcd44cef4eddf5659153a57bdc312db8}} 
\index{String Functions@{String Functions}!trim@{trim}}
\index{trim@{trim}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{trim()}{trim()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::trim (\begin{DoxyParamCaption}\item[{reference$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$}]{str,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{chars }\end{DoxyParamCaption})}



Removes byte characters from the start and end of a reference to an lvalue containing a string and returns string after processing (also see the \mbox{\hyperlink{operators_trim}{trim operator}}) 

By default (if the second argument is omitted or passed as an empty string) the following whitespace byte characters are removed\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character). To trim other characters, pass a string as the second argument specifying the byte characters to be removed.

This variant accepts variable references, in which case it will modify the string in place and also return the modified string.


\begin{DoxyParams}{Parameters}
{\em str} & a reference to an lvalue continaing the string value to process; if the lvalue does not have a string value \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned \\
\hline
{\em chars} & the characters to trim from the start and end of the string (default\+: {\ttfamily \char`\"{} \char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}r\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}t\char`\"{}}, {\ttfamily \char`\"{}\textbackslash{}v\char`\"{}} (vertical tab, A\+S\+C\+II 11), and {\ttfamily \char`\"{}\textbackslash{}0\char`\"{}} (null character))\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the trimmed string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_gae8d314e819a299d46d181696600d4293}{trim}}(\(\backslash\)str);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gaff249219345cbb027c8868c82585383a}\label{group__string__functions_gaff249219345cbb027c8868c82585383a}} 
\index{String Functions@{String Functions}!trim@{trim}}
\index{trim@{trim}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{trim()}{trim()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily nothing Qore\+::trim (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_ga49c6b104180fd40bb21d164773df1f4b}\label{group__string__functions_ga49c6b104180fd40bb21d164773df1f4b}} 
\index{String Functions@{String Functions}!trunc\+\_\+str@{trunc\+\_\+str}}
\index{trunc\+\_\+str@{trunc\+\_\+str}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{trunc\+\_\+str()}{trunc\_str()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::trunc\+\_\+str (\begin{DoxyParamCaption}\item[{softstring}]{str,  }\item[{softint}]{len,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})}



Returns a truncated string with no more than the given number of bytes and optionally converted to a specific \mbox{\hyperlink{character_encoding}{character encoding}}. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em str} & the string to truncate \\
\hline
{\em len} & the maximum byte length of the string \\
\hline
{\em encoding} & if given, the string returned will be returned in the given encoding, otherwise the encoding of \textbackslash{} str is used for the return value\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the string truncated to be no longer than the given byte length in the \mbox{\hyperlink{character_encoding}{character encoding}} given (or in the original string\textquotesingle{}s \mbox{\hyperlink{character_encoding}{character encoding}} if no {\itshape encoding} argument was passed to the function); if the string has a multi-\/byte \mbox{\hyperlink{character_encoding}{character encoding}}, this function will guarantee that the returned string ends on a valid character (in this case the byte length of the string could be less than the limit given)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string column = \mbox{\hyperlink{group__string__functions_ga49c6b104180fd40bb21d164773df1f4b}{trunc\_str}}(str, 80, dsp.getOSEncoding());
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em E\+N\+C\+O\+D\+I\+N\+G-\/\+C\+O\+N\+V\+E\+R\+S\+I\+O\+N-\/\+E\+R\+R\+OR} & this exception could be thrown if an explicit \mbox{\hyperlink{character_encoding}{character encoding}} was given and an error occurs during encoding conversion \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__string__functions_ga9729dd36419226b458d929a7d2ceb4e8}\label{group__string__functions_ga9729dd36419226b458d929a7d2ceb4e8}} 
\index{String Functions@{String Functions}!vprintf@{vprintf}}
\index{vprintf@{vprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{vprintf()}{vprintf()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::vprintf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt,  }\item[{auto}]{varg }\end{DoxyParamCaption})}



Outputs the string passed to standard output, using the first argument as a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and a second argument giving a list or a single argument to the format string; does not enforce field widths on arguments larger than the given field width. 

This function will not truncate output longer than any field width given in the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} \\
\hline
{\em varg} & the argument(s) corresponding to format specifiers in the format string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the formatted string output corresponding to the arguments given
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\mbox{\hyperlink{group__string__functions_ga9729dd36419226b458d929a7d2ceb4e8}{vprintf}}(\textcolor{stringliteral}{"%5s %3d"}, (\textcolor{stringliteral}{"a long string"}, 5000)); \textcolor{comment}{# will print out "a long string 5000"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_string_formatting}{String Formatting}} for information on the formatting \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}
\item \mbox{\hyperlink{group__string__functions_ga1d7d26076f388e311973a244850fd750}{f\+\_\+vprintf()}} for a similar function that enforces field widths 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_ga3204bee77dc83e5095f95f6582e591c0}\label{group__string__functions_ga3204bee77dc83e5095f95f6582e591c0}} 
\index{String Functions@{String Functions}!vprintf@{vprintf}}
\index{vprintf@{vprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{vprintf()}{vprintf()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::vprintf (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__string__functions_gab2494031a30dc02d9f6696435a8c4485}\label{group__string__functions_gab2494031a30dc02d9f6696435a8c4485}} 
\index{String Functions@{String Functions}!vsprintf@{vsprintf}}
\index{vsprintf@{vsprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{vsprintf()}{vsprintf()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::vsprintf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{fmt,  }\item[{auto}]{varg }\end{DoxyParamCaption})}



Returns a formatted string based on a \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} and other arguments given as a list after the format string; does not enforce field widths on arguments larger than the given field width. 

This function will not truncate output longer than any field width given in the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}}

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the \mbox{\hyperlink{group__string__functions_string_formatting}{format string}} \\
\hline
{\em varg} & the argument(s) corresponding to format specifiers in the format string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a formatted string corresponding to the arguments given
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = \mbox{\hyperlink{group__string__functions_gab2494031a30dc02d9f6696435a8c4485}{vsprintf}}(\textcolor{stringliteral}{"%5s %3d\(\backslash\)n"}, (\textcolor{stringliteral}{"a long string"}, 5000)); \textcolor{comment}{# will return "a long string 5000"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__string__functions_string_formatting}{String Formatting}} for information on the formatting \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}
\item \mbox{\hyperlink{group__string__functions_ga520bbbb55eebf102da87aedcbe37d2ff}{f\+\_\+vsprintf()}} for a similar function that enforces field widths 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__string__functions_gab53f40cb39abb3bd2a4d782741b6b0bd}\label{group__string__functions_gab53f40cb39abb3bd2a4d782741b6b0bd}} 
\index{String Functions@{String Functions}!vsprintf@{vsprintf}}
\index{vsprintf@{vsprintf}!String Functions@{String Functions}}
\subsubsection{\texorpdfstring{vsprintf()}{vsprintf()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::vsprintf (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_NOOP}{N\+O\+OP}} 
\end{DoxyParagraph}
