\hypertarget{group__type__conversion__functions}{}\doxysection{Type Conversion Functions} \label{group__type__conversion__functions}\index{Type Conversion Functions@{Type Conversion Functions}} Collaboration diagram for Type Conversion Functions\+:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=350pt]{group__type__conversion__functions} \end{center} \end{figure} \doxysubsection*{Modules} \begin{DoxyCompactItemize} \item \mbox{\hyperlink{group__string__type__constants}{String Type Constants}} \end{DoxyCompactItemize} \doxysubsection*{Functions} \begin{DoxyCompactItemize} \item auto \mbox{\hyperlink{group__type__conversion__functions_ga538c7c66624fd35b37a74108be62a04e}{Qore\+::auto\+\_\+cast}} (auto val) \begin{DoxyCompactList}\small\item\em Returns complex types converted to the most specific types possible using internal type folding. \end{DoxyCompactList}\item binary \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{Qore\+::binary}} () \begin{DoxyCompactList}\small\item\em Always returns an empty binary object (of zero length) \end{DoxyCompactList}\item binary \mbox{\hyperlink{group__type__conversion__functions_ga2cea7c8bd0f40661965bf9e5a35b0a81}{Qore\+::binary}} (null x) \begin{DoxyCompactList}\small\item\em Always returns an empty binary object (of zero length) \end{DoxyCompactList}\item binary \mbox{\hyperlink{group__type__conversion__functions_gad41f0cd19b4ebe21cf9562d2708ccabd}{Qore\+::binary}} (softstring str) \begin{DoxyCompactList}\small\item\em Returns a binary data type of the string passed; data types other than string will first be converted to a string and then returned as binary data. \end{DoxyCompactList}\item binary \mbox{\hyperlink{group__type__conversion__functions_ga1dc01cd648400e3bf4b2e69703b861b0}{Qore\+::binary}} (binary bin) \begin{DoxyCompactList}\small\item\em Always returns the same binary object passed. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga57dc696a2078b28d578b7a034f9ac555}{Qore\+::binary\+\_\+to\+\_\+string}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} b, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding) \begin{DoxyCompactList}\small\item\em Returns a string created from the binary data passed, taking an optional second argument giving the string encoding; if no second argument is passed then the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} is assumed. \end{DoxyCompactList}\item bool \mbox{\hyperlink{group__type__conversion__functions_ga22c89291d4105fcb558f49fe49aeae44}{Qore\+::boolean}} (any arg) \begin{DoxyCompactList}\small\item\em Converts the argument to a boolean value. \end{DoxyCompactList}\item float \mbox{\hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{Qore\+::float}} (softfloat f) \begin{DoxyCompactList}\small\item\em Converts the argument to a floating-\/point (float) value. \end{DoxyCompactList}\item float \mbox{\hyperlink{group__type__conversion__functions_ga1f8120b971c551f639a3f8f3c22840d2}{Qore\+::float}} () \begin{DoxyCompactList}\small\item\em Always returns 0.\+0. \end{DoxyCompactList}\item hash$<$ auto $>$ \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{Qore\+::hash}} (object obj) \begin{DoxyCompactList}\small\item\em Returns a hash of an object\textquotesingle{}s members. \end{DoxyCompactList}\item hash$<$ auto $>$ \mbox{\hyperlink{group__type__conversion__functions_ga97015b71e0a9f1118be166fc6465e48e}{Qore\+::hash}} (\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ auto $>$ l) \begin{DoxyCompactList}\small\item\em Returns a hash by taking even numbered list elements (starting with 0) and converting them to strings for the hash keys, and the odd numbered elements following the keys as the key value. \end{DoxyCompactList}\item hash$<$ auto $>$ \mbox{\hyperlink{group__type__conversion__functions_gada40c7265689dbfa89579beff516489a}{Qore\+::hash}} (\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ softstring $>$ keys, \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ auto $>$ values) \begin{DoxyCompactList}\small\item\em Returns a hash by taking the first list as a list of keys, and the second list as a list of values. \end{DoxyCompactList}\item hash \mbox{\hyperlink{group__type__conversion__functions_ga7739224e50b4d6ebfc800bbeb34dff5d}{Qore\+::hash}} (hash h) \begin{DoxyCompactList}\small\item\em Returns the same hash with all complex types stripped. \end{DoxyCompactList}\item hash$<$ auto $>$ \mbox{\hyperlink{group__type__conversion__functions_gaf78200b33ffd03848421d7bbbd46d37a}{Qore\+::hash}} () \begin{DoxyCompactList}\small\item\em Always returns the same hash passed. \end{DoxyCompactList}\item int \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{Qore\+::int}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, int base=10) \begin{DoxyCompactList}\small\item\em Converts the string to an integer value with respect to the {\bfseries{base}}. \end{DoxyCompactList}\item int \mbox{\hyperlink{group__type__conversion__functions_gaedc7dfca9a2bab4770135bb01a34b63c}{Qore\+::int}} (softint i) \begin{DoxyCompactList}\small\item\em Converts the argument to an integer value. \end{DoxyCompactList}\item int \mbox{\hyperlink{group__type__conversion__functions_ga03ab6f55991f898f3ba14da7b8d1bde6}{Qore\+::int}} () \begin{DoxyCompactList}\small\item\em Always returns 0. \end{DoxyCompactList}\item list$<$ auto $>$ \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{Qore\+::list}} (...) \begin{DoxyCompactList}\small\item\em Returns a list of the arguments passed at the top level. \end{DoxyCompactList}\item number \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{Qore\+::number}} (softnumber n) \begin{DoxyCompactList}\small\item\em Converts the argument to a \mbox{\hyperlink{basic_data_types_number}{number}} value. \end{DoxyCompactList}\item number \mbox{\hyperlink{group__type__conversion__functions_ga43bd1e4a512f68f1b9fd3087b591d6d0}{Qore\+::number}} () \begin{DoxyCompactList}\small\item\em Always returns 0.\+0. \end{DoxyCompactList}\item string \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{Qore\+::string}} (softstring str, \+\_\+\+\_\+7\+\_\+ string enc) \begin{DoxyCompactList}\small\item\em Converts the argument to a string. \end{DoxyCompactList}\item string \mbox{\hyperlink{group__type__conversion__functions_ga62b00f727549f979c1dc83450d2819a2}{Qore\+::string}} () \begin{DoxyCompactList}\small\item\em Always returns an empty string. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}{Qore\+::type}} (auto arg) \begin{DoxyCompactList}\small\item\em Returns a string giving the data type of the argument passed; see \mbox{\hyperlink{group__string__type__constants}{String Type Constants}} for the values returned by this function. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga4e463159044f5ef430e729e8c686471c}{Qore\+::typename}} (auto arg) \begin{DoxyCompactList}\small\item\em Returns a string giving the data type of the argument passed; see \mbox{\hyperlink{group__string__type__constants}{String Type Constants}} for the values returned by this function. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Detailed Description} \doxysubsection{Function Documentation} \mbox{\Hypertarget{group__type__conversion__functions_ga538c7c66624fd35b37a74108be62a04e}\label{group__type__conversion__functions_ga538c7c66624fd35b37a74108be62a04e}} \index{Type Conversion Functions@{Type Conversion Functions}!auto\_cast@{auto\_cast}} \index{auto\_cast@{auto\_cast}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{auto\_cast()}{auto\_cast()}} {\footnotesize\ttfamily auto Qore\+::auto\+\_\+cast (\begin{DoxyParamCaption}\item[{auto}]{val }\end{DoxyParamCaption})} Returns complex types converted to the most specific types possible using internal type folding. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{list tmp;} \DoxyCodeLine{tmp += 1;} \DoxyCodeLine{tmp += 2;} \DoxyCodeLine{list int\_list = \mbox{\hyperlink{group__type__conversion__functions_ga538c7c66624fd35b37a74108be62a04e}{auto\_cast}}(tmp);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em val} & the value to convert\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a copy of the input value with complex types converted to the most specific types possible using internal type folding \end{DoxyReturn} \begin{DoxySince}{Since} Qore 0.\+9.\+3 \end{DoxySince} \mbox{\Hypertarget{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}\label{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}} \index{Type Conversion Functions@{Type Conversion Functions}!binary@{binary}} \index{binary@{binary}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{binary()}{binary()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}} {\footnotesize\ttfamily binary Qore\+::binary (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Always returns an empty binary object (of zero length) \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} The \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary()}} function is used for type conversions, therefore this variant is not tagged with \mbox{\hyperlink{code_flags_NOOP}{NOOP}} \begin{DoxySeeAlso}{See also} \begin{DoxyItemize} \item \mbox{\hyperlink{group__type__conversion__functions_gad41f0cd19b4ebe21cf9562d2708ccabd}{binary(softstring)}} \item \mbox{\hyperlink{group__type__conversion__functions_ga2cea7c8bd0f40661965bf9e5a35b0a81}{binary(null)}} \end{DoxyItemize} \end{DoxySeeAlso} \mbox{\Hypertarget{group__type__conversion__functions_ga1dc01cd648400e3bf4b2e69703b861b0}\label{group__type__conversion__functions_ga1dc01cd648400e3bf4b2e69703b861b0}} \index{Type Conversion Functions@{Type Conversion Functions}!binary@{binary}} \index{binary@{binary}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{binary()}{binary()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}} {\footnotesize\ttfamily binary Qore\+::binary (\begin{DoxyParamCaption}\item[{binary}]{bin }\end{DoxyParamCaption})} Always returns the same binary object passed. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} The \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary()}} function is used for type conversions, therefore this variant is not tagged with \mbox{\hyperlink{code_flags_NOOP}{NOOP}} \mbox{\Hypertarget{group__type__conversion__functions_ga2cea7c8bd0f40661965bf9e5a35b0a81}\label{group__type__conversion__functions_ga2cea7c8bd0f40661965bf9e5a35b0a81}} \index{Type Conversion Functions@{Type Conversion Functions}!binary@{binary}} \index{binary@{binary}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{binary()}{binary()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}} {\footnotesize\ttfamily binary Qore\+::binary (\begin{DoxyParamCaption}\item[{null}]{x }\end{DoxyParamCaption})} Always returns an empty binary object (of zero length) \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} The \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary()}} function is used for type conversions, therefore this variant is not tagged with \mbox{\hyperlink{code_flags_NOOP}{NOOP}} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{group__type__conversion__functions_gad41f0cd19b4ebe21cf9562d2708ccabd}{binary(softstring)}} \end{DoxySeeAlso} \mbox{\Hypertarget{group__type__conversion__functions_gad41f0cd19b4ebe21cf9562d2708ccabd}\label{group__type__conversion__functions_gad41f0cd19b4ebe21cf9562d2708ccabd}} \index{Type Conversion Functions@{Type Conversion Functions}!binary@{binary}} \index{binary@{binary}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{binary()}{binary()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}} {\footnotesize\ttfamily binary Qore\+::binary (\begin{DoxyParamCaption}\item[{softstring}]{str }\end{DoxyParamCaption})} Returns a binary data type of the string passed; data types other than string will first be converted to a string and then returned as binary data. This function is useful if, for example, a string type actually contains binary data; using this function will ensure that all data in the string (even if it contains embedded nulls) is maintained in the binary object (\mbox{\hyperlink{namespace_qore}{Qore}} strings must normally be terminated by a single null, so some Qore string operations do not work on binary data with embedded nulls). \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{binary b = \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}(str);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_a825e0531419ae8abce66288e9d5ea4b1}{Qore\+::zzz8stringzzz9\+::to\+Binary()}} \end{DoxySeeAlso} \mbox{\Hypertarget{group__type__conversion__functions_ga57dc696a2078b28d578b7a034f9ac555}\label{group__type__conversion__functions_ga57dc696a2078b28d578b7a034f9ac555}} \index{Type Conversion Functions@{Type Conversion Functions}!binary\_to\_string@{binary\_to\_string}} \index{binary\_to\_string@{binary\_to\_string}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{binary\_to\_string()}{binary\_to\_string()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::binary\+\_\+to\+\_\+string (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{b, }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})} Returns a string created from the binary data passed, taking an optional second argument giving the string encoding; if no second argument is passed then the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} is assumed. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em b} & the binary object to convert directly to a string \\ \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 created from the binary data passed \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{string str = \mbox{\hyperlink{group__type__conversion__functions_ga57dc696a2078b28d578b7a034f9ac555}{binary\_to\_string}}(b, \textcolor{stringliteral}{"{}iso-\/8859-\/1"{}});} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{group__type__conversion__functions_ga22c89291d4105fcb558f49fe49aeae44}\label{group__type__conversion__functions_ga22c89291d4105fcb558f49fe49aeae44}} \index{Type Conversion Functions@{Type Conversion Functions}!boolean@{boolean}} \index{boolean@{boolean}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{boolean()}{boolean()}} {\footnotesize\ttfamily bool Qore\+::boolean (\begin{DoxyParamCaption}\item[{any}]{arg }\end{DoxyParamCaption})} Converts the argument to a boolean value. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em arg} & the argument to convert to a boolean\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} the boolean value corresponding to the argument \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{bool b = \mbox{\hyperlink{group__type__conversion__functions_ga22c89291d4105fcb558f49fe49aeae44}{boolean}}(1); \textcolor{comment}{\# returns True}} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyNote}{Note} this function behaves differently when \mbox{\hyperlink{parse_directives_strict-bool-eval}{\%strict-\/bool-\/eval}} is set \end{DoxyNote} \mbox{\Hypertarget{group__type__conversion__functions_ga1f8120b971c551f639a3f8f3c22840d2}\label{group__type__conversion__functions_ga1f8120b971c551f639a3f8f3c22840d2}} \index{Type Conversion Functions@{Type Conversion Functions}!float@{float}} \index{float@{float}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{float()}{float()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily float Qore\+::float (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Always returns 0.\+0. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} The \mbox{\hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{float()}} function is used for type conversions, therefore this variant is not tagged with \mbox{\hyperlink{code_flags_NOOP}{NOOP}} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{float(softfloat)}} \end{DoxySeeAlso} \mbox{\Hypertarget{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}\label{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}} \index{Type Conversion Functions@{Type Conversion Functions}!float@{float}} \index{float@{float}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{float()}{float()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily float Qore\+::float (\begin{DoxyParamCaption}\item[{softfloat}]{f }\end{DoxyParamCaption})} Converts the argument to a floating-\/point (float) value. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em f} & the argument to convert to a float\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} the float value corresponding to the argument \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{float i = \mbox{\hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{float}}(\textcolor{stringliteral}{"{}3.1415"{}});} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{group__type__conversion__functions_gaf78200b33ffd03848421d7bbbd46d37a}\label{group__type__conversion__functions_gaf78200b33ffd03848421d7bbbd46d37a}} \index{Type Conversion Functions@{Type Conversion Functions}!hash@{hash}} \index{hash@{hash}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{hash()}{hash()}\hspace{0.1cm}{\footnotesize\ttfamily [1/5]}} {\footnotesize\ttfamily hash$<$auto$>$ Qore\+::hash (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Always returns the same hash passed. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} The \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash()}} function is used for type conversions, therefore this variant is not tagged with \mbox{\hyperlink{code_flags_NOOP}{NOOP}} \mbox{\Hypertarget{group__type__conversion__functions_ga7739224e50b4d6ebfc800bbeb34dff5d}\label{group__type__conversion__functions_ga7739224e50b4d6ebfc800bbeb34dff5d}} \index{Type Conversion Functions@{Type Conversion Functions}!hash@{hash}} \index{hash@{hash}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{hash()}{hash()}\hspace{0.1cm}{\footnotesize\ttfamily [2/5]}} {\footnotesize\ttfamily hash Qore\+::hash (\begin{DoxyParamCaption}\item[{hash}]{h }\end{DoxyParamCaption})} Returns the same hash with all complex types stripped. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{hash h2 = \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}(h1);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em h} & the hash to return\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} the same hash passed as an argument with all complex types stripped \end{DoxyReturn} \begin{DoxySince}{Since} \begin{DoxyItemize} \item Qore 0.\+8.\+13 this function was modified to remove type information at runtime from typed hashes \end{DoxyItemize} \end{DoxySince} \mbox{\Hypertarget{group__type__conversion__functions_ga97015b71e0a9f1118be166fc6465e48e}\label{group__type__conversion__functions_ga97015b71e0a9f1118be166fc6465e48e}} \index{Type Conversion Functions@{Type Conversion Functions}!hash@{hash}} \index{hash@{hash}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{hash()}{hash()}\hspace{0.1cm}{\footnotesize\ttfamily [3/5]}} {\footnotesize\ttfamily hash$<$auto$>$ Qore\+::hash (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ auto $>$}]{l }\end{DoxyParamCaption})} Returns a hash by taking even numbered list elements (starting with 0) and converting them to strings for the hash keys, and the odd numbered elements following the keys as the key value. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em l} & the list to process in a manner similar to perl\textquotesingle{}s hash initialization\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a hash by taking even numbered list elements (starting with 0) and converting them to strings for the hash keys, and the odd numbered elements following the keys as the key value \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{hash h = \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}((\textcolor{stringliteral}{"{}a"{}}, 1, \textcolor{stringliteral}{"{}b"{}}, \textcolor{stringliteral}{"{}two"{}}));} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{group__type__conversion__functions_gada40c7265689dbfa89579beff516489a}\label{group__type__conversion__functions_gada40c7265689dbfa89579beff516489a}} \index{Type Conversion Functions@{Type Conversion Functions}!hash@{hash}} \index{hash@{hash}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{hash()}{hash()}\hspace{0.1cm}{\footnotesize\ttfamily [4/5]}} {\footnotesize\ttfamily hash$<$auto$>$ Qore\+::hash (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ softstring $>$}]{keys, }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}$<$ auto $>$}]{values }\end{DoxyParamCaption})} Returns a hash by taking the first list as a list of keys, and the second list as a list of values. If the two lists are of unequal sizes, then the keys list takes precedence (if the values list is longer, excess values are ignored, if the keys list is longer, then excess elements are assigned \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}}) \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em keys} & a list of key values for the hash \\ \hline {\em values} & a list of values for the hash, corresponding to the elements in {\itshape keys} \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a hash by taking the first list as a list of keys, and the second list as a list of values \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{hash h = \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}(keysv, values);} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}\label{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}} \index{Type Conversion Functions@{Type Conversion Functions}!hash@{hash}} \index{hash@{hash}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{hash()}{hash()}\hspace{0.1cm}{\footnotesize\ttfamily [5/5]}} {\footnotesize\ttfamily hash$<$auto$>$ Qore\+::hash (\begin{DoxyParamCaption}\item[{object}]{obj }\end{DoxyParamCaption})} Returns a hash of an object\textquotesingle{}s members. \begin{DoxyNote}{Note} that if this function is called from outside the class\textquotesingle{} scope, the hash will only contain the object\textquotesingle{}s public members \end{DoxyNote} \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em obj} & the object to process\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a hash of an object\textquotesingle{}s members \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{hash h = \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}(obj);} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{group__type__conversion__functions_ga03ab6f55991f898f3ba14da7b8d1bde6}\label{group__type__conversion__functions_ga03ab6f55991f898f3ba14da7b8d1bde6}} \index{Type Conversion Functions@{Type Conversion Functions}!int@{int}} \index{int@{int}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{int()}{int()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}} {\footnotesize\ttfamily int Qore\+::int (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Always returns 0. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} The \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int()}} function is used for type conversions, therefore this variant is not tagged with \mbox{\hyperlink{code_flags_NOOP}{NOOP}} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{group__type__conversion__functions_gaedc7dfca9a2bab4770135bb01a34b63c}{int(softint)}} \end{DoxySeeAlso} \mbox{\Hypertarget{group__type__conversion__functions_gaedc7dfca9a2bab4770135bb01a34b63c}\label{group__type__conversion__functions_gaedc7dfca9a2bab4770135bb01a34b63c}} \index{Type Conversion Functions@{Type Conversion Functions}!int@{int}} \index{int@{int}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{int()}{int()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}} {\footnotesize\ttfamily int Qore\+::int (\begin{DoxyParamCaption}\item[{softint}]{i }\end{DoxyParamCaption})} Converts the argument to an integer value. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em i} & the argument to convert to an integer\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} the integer value corresponding to the argument \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{int i = \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}1"{}});} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}\label{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}} \index{Type Conversion Functions@{Type Conversion Functions}!int@{int}} \index{int@{int}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{int()}{int()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}} {\footnotesize\ttfamily int Qore\+::int (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str, }\item[{int}]{base = {\ttfamily 10} }\end{DoxyParamCaption})} Converts the string to an integer value with respect to the {\bfseries{base}}. If a character is out of range of the corresponding {\bfseries{base}} only the substring preceeding the character is taken into account.~\newline Base 0 means to interpret as a code literal, so that the actual base is 8, 10, or 16.~\newline (Does the same as \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_ae5fc7b01d0469fc2a015a0f6f3b0ae26}{Qore\+::zzz8stringzzz9\+::to\+Int(int base)}}). \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em str} & the string to convert to an integer \\ \hline {\em base} & the base of the integer in the string; this value must be 0 or 2 -\/ 36 inclusive or an {\ttfamily INVALID-\/\+BASE} exception will be thrown\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} the integer value corresponding to the arguments \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}fe"{}}, 16); // returns 254} \DoxyCodeLine{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}34"{}}, 5); // returns 19} \DoxyCodeLine{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}2p"{}}, 25); // returns 2 (p means 25, which \textcolor{keywordflow}{is} out of range)} \DoxyCodeLine{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}2p"{}}, 26); // returns 77} \DoxyCodeLine{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}2z"{}}, 36); // returns 107} \DoxyCodeLine{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}21"{}}); // returns 21 (base = 10)} \DoxyCodeLine{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}21"{}}, 0); // returns 21 (base = 10)} \DoxyCodeLine{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}021"{}}, 0); // returns 17 (base = 8)} \DoxyCodeLine{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}(\textcolor{stringliteral}{"{}0x21"{}}, 0); // returns 33 (base = 16)} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em INVALID-\/\+BASE} & the base is invalid; must be 0 or 2 -\/ 36 inclusive\\ \hline \end{DoxyExceptions} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_ae5fc7b01d0469fc2a015a0f6f3b0ae26}{Qore\+::zzz8stringzzz9\+::to\+Int(int base)}} \end{DoxySeeAlso} \begin{DoxySince}{Since} Qore 0.\+8.\+5, this variant with the {\bfseries{base}} argument is supported \end{DoxySince} \mbox{\Hypertarget{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}\label{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}} \index{Type Conversion Functions@{Type Conversion Functions}!list@{list}} \index{list@{list}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{list()}{list()}} {\footnotesize\ttfamily list$<$auto$>$ Qore\+::list (\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})} Returns a list of the arguments passed at the top level. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em ...} & the arguments that will be returned as a list\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a list of the arguments passed at the top level; if a sole argument of \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} is passed, then an empty list is returned \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{list l = \mbox{\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}}(1, 2, 3, 4);} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{group__type__conversion__functions_ga43bd1e4a512f68f1b9fd3087b591d6d0}\label{group__type__conversion__functions_ga43bd1e4a512f68f1b9fd3087b591d6d0}} \index{Type Conversion Functions@{Type Conversion Functions}!number@{number}} \index{number@{number}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{number()}{number()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily number Qore\+::number (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Always returns 0.\+0. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} The \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number()}} function is used for type conversions, therefore this variant is not tagged with \mbox{\hyperlink{code_flags_NOOP}{NOOP}} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number(softnumber)}} \end{DoxySeeAlso} \mbox{\Hypertarget{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}\label{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}} \index{Type Conversion Functions@{Type Conversion Functions}!number@{number}} \index{number@{number}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{number()}{number()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily number Qore\+::number (\begin{DoxyParamCaption}\item[{softnumber}]{n }\end{DoxyParamCaption})} Converts the argument to a \mbox{\hyperlink{basic_data_types_number}{number}} value. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em n} & the argument to convert to a \mbox{\hyperlink{basic_data_types_number}{number}}\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} the \mbox{\hyperlink{basic_data_types_number}{number}} value corresponding to the argument \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{number n = \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number}}(\textcolor{stringliteral}{"{}2.23040945718005e35"{}});} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{group__type__conversion__functions_ga62b00f727549f979c1dc83450d2819a2}\label{group__type__conversion__functions_ga62b00f727549f979c1dc83450d2819a2}} \index{Type Conversion Functions@{Type Conversion Functions}!string@{string}} \index{string@{string}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{string()}{string()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily string Qore\+::string (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Always returns an empty string. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} The \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string()}} function is used for type conversions, therefore this variant is not tagged with \mbox{\hyperlink{code_flags_NOOP}{NOOP}} \begin{DoxySeeAlso}{See also} string(softstring) \end{DoxySeeAlso} \mbox{\Hypertarget{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}\label{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}} \index{Type Conversion Functions@{Type Conversion Functions}!string@{string}} \index{string@{string}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{string()}{string()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily string Qore\+::string (\begin{DoxyParamCaption}\item[{softstring}]{str, }\item[{\+\_\+\+\_\+7\+\_\+ string}]{enc }\end{DoxyParamCaption})} Converts the argument to a string. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em str} & the argument to convert to a string \\ \hline {\em enc} & the encoding of the string returned\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} the string value corresponding to the argument(s) \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{string str = \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}(100);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxySince}{Since} the {\ttfamily enc} argument was added in Qore 0.\+8.\+12 \end{DoxySince} \mbox{\Hypertarget{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}\label{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}} \index{Type Conversion Functions@{Type Conversion Functions}!type@{type}} \index{type@{type}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{type()}{type()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::type (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})} Returns a string giving the data type of the argument passed; see \mbox{\hyperlink{group__string__type__constants}{String Type Constants}} for the values returned by this function. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em arg} & the argument to check\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a string giving the data type of the argument passed; see \mbox{\hyperlink{group__string__type__constants}{String Type Constants}} for the values returned by this function \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{string type = \mbox{\hyperlink{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}{type}}(v);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyNote}{Note} \begin{DoxyItemize} \item This function is identical to typename(any) and to calling pseudo-\/method \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}} \item It is faster and more efficient to use \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()}} for comparing data types \end{DoxyItemize} \end{DoxyNote} \begin{DoxySeeAlso}{See also} pseudo-\/method \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()}} \end{DoxySeeAlso} \mbox{\Hypertarget{group__type__conversion__functions_ga4e463159044f5ef430e729e8c686471c}\label{group__type__conversion__functions_ga4e463159044f5ef430e729e8c686471c}} \index{Type Conversion Functions@{Type Conversion Functions}!typename@{typename}} \index{typename@{typename}!Type Conversion Functions@{Type Conversion Functions}} \doxysubsubsection{\texorpdfstring{typename()}{typename()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::typename (\begin{DoxyParamCaption}\item[{auto}]{arg }\end{DoxyParamCaption})} Returns a string giving the data type of the argument passed; see \mbox{\hyperlink{group__string__type__constants}{String Type Constants}} for the values returned by this function. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em arg} & the argument to check\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a string giving the data type of the argument passed; see \mbox{\hyperlink{group__string__type__constants}{String Type Constants}} for the values returned by this function \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{string type = \mbox{\hyperlink{group__type__conversion__functions_ga4e463159044f5ef430e729e8c686471c}{typename}}(v);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyNote}{Note} \begin{DoxyItemize} \item This function is identical to type(any) and to calling pseudo-\/method \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}} \item It is faster and more efficient to use \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()}} for comparing data types \end{DoxyItemize} \end{DoxyNote}