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

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_BinaryPadRight&amp;diff=4903&amp;oldid=prev</id>
		<title>UberFoX: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_BinaryPadRight&amp;diff=4903&amp;oldid=prev"/>
				<updated>2015-06-14T12:37:44Z</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://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_BinaryPadRight&amp;diff=4902&amp;oldid=prev</id>
		<title>UberFoX: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_BinaryPadRight&amp;diff=4902&amp;oldid=prev"/>
				<updated>2014-08-11T21:41:08Z</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://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_BinaryPadRight&amp;diff=3933&amp;oldid=prev</id>
		<title>UberFoX at 22:12, 1 August 2014</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_BinaryPadRight&amp;diff=3933&amp;oldid=prev"/>
				<updated>2014-08-01T22:12:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:12, 1 August 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Default: 0x20 (Space)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Default: 0x20 (Space)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;minus;&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==== flag====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==== flag ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Optional; Decide how to pad&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Optional; Decide how to pad&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_BinaryPadRight&amp;diff=3931&amp;oldid=prev</id>
		<title>UberFoX: Created page with &quot;&lt;pre&gt; BinaryPadRight( &lt;binary-array&gt;, &lt;padSize&gt;, &lt;padWith&gt;, &lt;flag&gt; ) &lt;/pre&gt;  === Description ===  Right pad a binary variable with a number of bytes or pad it to a total number o...&quot;</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_BinaryPadRight&amp;diff=3931&amp;oldid=prev"/>
				<updated>2014-08-01T22:11:40Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; BinaryPadRight( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt;, &amp;lt;flag&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Right pad a binary variable with a number of bytes or pad it to a total number o...&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;
BinaryPadRight( &amp;lt;binary-array&amp;gt;, &amp;lt;padSize&amp;gt;, &amp;lt;padWith&amp;gt;, &amp;lt;flag&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Right pad a binary variable with a number of bytes or pad it to a total number of bytes.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== binary-array ====&lt;br /&gt;
&lt;br /&gt;
The binary variable to use. &lt;br /&gt;
&lt;br /&gt;
==== padSize ====&lt;br /&gt;
&lt;br /&gt;
The size of the padding.&lt;br /&gt;
&lt;br /&gt;
==== padWith ====&lt;br /&gt;
&lt;br /&gt;
Optional; A byte to pad with.&lt;br /&gt;
&lt;br /&gt;
Default: 0x20 (Space)&lt;br /&gt;
&lt;br /&gt;
==== flag====&lt;br /&gt;
&lt;br /&gt;
Optional; Decide how to pad&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
True = Will pad the binary until it reaches the given padSize in total size&lt;br /&gt;
False = Will add the padWith the padSize number of times&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Default: false&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
Success: Returns true.&lt;br /&gt;
&lt;br /&gt;
Failure: Returns false (Also returns false on flag TRUE if you try pad below the size of the binary).&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Pad 3 bytes only&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create the binary&lt;br /&gt;
$a = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
// Print it&lt;br /&gt;
say &amp;quot;Before:&amp;quot;;&lt;br /&gt;
say BinaryExpand($a);&lt;br /&gt;
// Pad it&lt;br /&gt;
BinaryPadRight($a, 3, 0x20);&lt;br /&gt;
// Print result&lt;br /&gt;
say &amp;quot;After:&amp;quot;;&lt;br /&gt;
say BinaryExpand($a);&lt;br /&gt;
// Prints:&lt;br /&gt;
// Before:&lt;br /&gt;
// 00 | 48 65 6C 6C 6F -- -- -- -- -- -- -- -- -- -- -- Hello&lt;br /&gt;
// After:&lt;br /&gt;
// 00 | 48 65 6C 6C 6F 20 20 20 -- -- -- -- -- -- -- -- Hello&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Force the binary to become a certain size and use padding to get there (Returns false if it does not get to the size you wanted)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
// Create the binary&lt;br /&gt;
$a = Pack(&amp;quot;A*&amp;quot;, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
// Print it&lt;br /&gt;
say &amp;quot;Before:&amp;quot;;&lt;br /&gt;
say BinaryExpand($a);&lt;br /&gt;
// Pad it&lt;br /&gt;
BinaryPadRight($a, 12, 0x20, true);&lt;br /&gt;
// Print result&lt;br /&gt;
say &amp;quot;After:&amp;quot;;&lt;br /&gt;
say BinaryExpand($a);&lt;br /&gt;
// Prints:&lt;br /&gt;
// Before:&lt;br /&gt;
// 00 | 48 65 6C 6C 6F -- -- -- -- -- -- -- -- -- -- -- Hello&lt;br /&gt;
// After:&lt;br /&gt;
// 00 | 48 65 6C 6C 6F 20 20 20 20 20 20 20 -- -- -- -- Hello&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>