<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deadned</id>
	<title>Kolmafia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deadned"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/Deadned"/>
	<updated>2026-04-30T18:13:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_string&amp;diff=5750</id>
		<title>To string</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_string&amp;diff=5750"/>
		<updated>2013-04-21T04:14:07Z</updated>

		<summary type="html">&lt;p&gt;Deadned: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_string}}{{&lt;br /&gt;
#vardefine:return_type|string}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;any&#039;&#039;&#039; {{pspan|anything}}|&lt;br /&gt;
p1desc={{Pspan|anything}} is any data type that KoLmafia uses|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function2={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;num&#039;&#039;&#039; {{pspan|number}}|&lt;br /&gt;
parameter2=&amp;amp;nbsp;&#039;&#039;&#039;string&#039;&#039;&#039; {{pspan|format}}|&lt;br /&gt;
p1desc={{Pspan|number}} is either an int or a float|&lt;br /&gt;
p2desc={{Pspan|format}} is a format string used by the [http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html Java formatter]|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Returns any datatype as its string equivalent. For int and float types, you may optionally specify a format string, which can be useful for (among other things) printing only a few decimal places, or placing commas to break up large numerals.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=Displays only two decimal places|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
to_string(123.456789,&amp;quot;%.2f&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Returned: 123.46}}&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Displays an integer with commas.|&lt;br /&gt;
code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
to_string(10000000,&amp;quot;%,d&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Returned: 10,000,000}}|&lt;br /&gt;
&lt;br /&gt;
special=Note that this function isn&#039;t needed for print() and string concatenation, as KoLmafia handles conversions transparently in those cases; however, this function is still useful for passing a non-string value as a string parameter, or a part thereof.|&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Datatype Conversions]]&lt;/div&gt;</summary>
		<author><name>Deadned</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=To_string&amp;diff=5749</id>
		<title>To string</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=To_string&amp;diff=5749"/>
		<updated>2013-04-21T04:10:10Z</updated>

		<summary type="html">&lt;p&gt;Deadned: Two examples for formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|to_string}}{{&lt;br /&gt;
#vardefine:return_type|string}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;any&#039;&#039;&#039; {{pspan|anything}}|&lt;br /&gt;
p1desc={{Pspan|anything}} is any data type that KoLmafia uses|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function2={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1=&amp;amp;nbsp;&#039;&#039;&#039;num&#039;&#039;&#039; {{pspan|number}}|&lt;br /&gt;
parameter2=&amp;amp;nbsp;&#039;&#039;&#039;string&#039;&#039;&#039; {{pspan|format}}|&lt;br /&gt;
p1desc={{Pspan|number}} is either an int or a float|&lt;br /&gt;
p2desc={{Pspan|format}} is a format string used by the [http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html Java formatter]|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Returns any datatype as its string equivalent. For int and float types, you may optionally specify a format string, which can be useful for (among other things) printing only a few decimal places, or placing commas to break up large numerals.|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
description=Displays only two decimal places|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
ash to_string(123.456789,&amp;quot;%.2f&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Returned: 123.46}}&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=Displays an integer with commas.|&lt;br /&gt;
code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
to_string(10000000,&amp;quot;%,d&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Returned: 10,000,000}}|&lt;br /&gt;
&lt;br /&gt;
special=Note that this function isn&#039;t needed for print() and string concatenation, as KoLmafia handles conversions transparently in those cases; however, this function is still useful for passing a non-string value as a string parameter, or a part thereof.|&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Datatype Conversions]]&lt;/div&gt;</summary>
		<author><name>Deadned</name></author>
	</entry>
</feed>