<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://ubersoft.org/Sputnik/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_Chomp</id>
		<title>Core Function Chomp - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_Chomp"/>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Chomp&amp;action=history"/>
		<updated>2026-04-11T21:28:03Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Chomp&amp;diff=4838&amp;oldid=prev</id>
		<title>UberFoX: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Chomp&amp;diff=4838&amp;oldid=prev"/>
				<updated>2015-06-14T12:37:39Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:37, 14 June 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Chomp&amp;diff=4837&amp;oldid=prev</id>
		<title>UberFoX: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Chomp&amp;diff=4837&amp;oldid=prev"/>
				<updated>2014-08-11T21:41:05Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:41, 11 August 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Chomp&amp;diff=3367&amp;oldid=prev</id>
		<title>UberFoX: Created page with &quot;&lt;pre&gt; Chomp( &lt;variable&gt;, &lt;delim&gt; ) &lt;/pre&gt;  === Description ===  Removes trailing newlines and returns the number of characters removed.  === Parameters ===  ==== variable ====  C...&quot;</title>
		<link rel="alternate" type="text/html" href="http://ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Chomp&amp;diff=3367&amp;oldid=prev"/>
				<updated>2013-09-26T20:22:46Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; Chomp( &amp;lt;variable&amp;gt;, &amp;lt;delim&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Removes trailing newlines and returns the number of characters removed.  === Parameters ===  ==== variable ====  C...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Chomp( &amp;lt;variable&amp;gt;, &amp;lt;delim&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Removes trailing newlines and returns the number of characters removed.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== variable ====&lt;br /&gt;
&lt;br /&gt;
Can be any variable including numbers, strings, arrays.&lt;br /&gt;
&lt;br /&gt;
Note - If it finds an ARRAY it will do the chomp() on every element in the array (but not the keys).&lt;br /&gt;
&lt;br /&gt;
It will chomp elements that are numeric, string or arrays it will not mess with objects etc.&lt;br /&gt;
&lt;br /&gt;
==== delim ====&lt;br /&gt;
&lt;br /&gt;
Optional; Provide a string that each character will be considered a newline delimiter.&lt;br /&gt;
&lt;br /&gt;
Default: &amp;quot;\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
The character that was removed. &lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
This modifies the string in place.&lt;br /&gt;
&lt;br /&gt;
This function only counts \n as a valid newline however you may provide it with a string you would like it to consider newlines.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Remove all newlines from end of a string&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cat = &amp;quot;UberFoX\n\n\n\n\n\n&amp;quot;;&lt;br /&gt;
$rem = chomp($cat);&lt;br /&gt;
print &amp;quot;$rem = '$cat'\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all characters we define as newlines from end of a string&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$cat = &amp;quot;UberFoX\n---\r&amp;quot;;&lt;br /&gt;
$rem = chomp($cat, &amp;quot;-\r\n&amp;quot;);&lt;br /&gt;
print &amp;quot;$rem = '$cat'\n&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	</feed>