<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://oxeyegames.com/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Sub</id>
		<title>Sub - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Sub"/>
		<link rel="alternate" type="text/html" href="http://oxeyegames.com/wiki/index.php?title=Sub&amp;action=history"/>
		<updated>2026-04-13T19:27:26Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://oxeyegames.com/wiki/index.php?title=Sub&amp;diff=118&amp;oldid=prev</id>
		<title>Jeb: Created page with '{{GUIMethod | WChar:sub(start[, end]) | This method will create a substring of the text object. There are several ways of using the method:  # One parameter bigger than 0. This w...'</title>
		<link rel="alternate" type="text/html" href="http://oxeyegames.com/wiki/index.php?title=Sub&amp;diff=118&amp;oldid=prev"/>
				<updated>2009-03-08T23:09:18Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#39;{{GUIMethod | WChar:sub(start[, end]) | This method will create a substring of the text object. There are several ways of using the method:  # One parameter bigger than 0. This w...&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{GUIMethod&lt;br /&gt;
|&lt;br /&gt;
WChar:sub(start[, end])&lt;br /&gt;
|&lt;br /&gt;
This method will create a substring of the text object. There are several ways of using the method:&lt;br /&gt;
&lt;br /&gt;
# One parameter bigger than 0. This will create a substring from 'start' (inclusive) to the end of the string.&lt;br /&gt;
# One parameter smaller than 0. This will create a substring 'start' characters from the end, to the end.&lt;br /&gt;
# Two paramters both bigger than 0. This will create a substring from 'start' (inclusive) to 'end' (inclusive).&lt;br /&gt;
# Two parameters, with 'start' smaller than 0 and 'end' bigger than 0. This will create a substring that begins from the end, using 'start' as an offset, up to 'end' (counting from the beginning of the string).&lt;br /&gt;
# Two parameters, with 'start' bigger than 0 and 'end' smaller than 0. Again, 'start' will be the starting position (inclusive) and 'end' will count from the end of the string.&lt;br /&gt;
# Two paramters both smaller than 0. Counts both 'start' and 'end' from the end of the string.&lt;br /&gt;
|&lt;br /&gt;
{{MethodParam|start|An integer|asdf}}&lt;br /&gt;
|&lt;br /&gt;
Returns a new WChar object containing the substring. The string will be empty if the parameters are incorrect.&lt;br /&gt;
}}&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   local text = WChar(&amp;quot;abc123&amp;quot;)&lt;br /&gt;
   text:sub(1)      -- returns &amp;quot;abc123&amp;quot;&lt;br /&gt;
   text:sub(2)      -- returns &amp;quot;bc123&amp;quot;&lt;br /&gt;
   text:sub(4)      -- returns &amp;quot;123&amp;quot;&lt;br /&gt;
   text:sub(0)      -- returns &amp;quot;abc123&amp;quot; (note: may change in future implementations)&lt;br /&gt;
   text:sub(-1)     -- returns &amp;quot;3&amp;quot;&lt;br /&gt;
   text:sub(-3)     -- returns &amp;quot;123&amp;quot;&lt;br /&gt;
   text:sub(1,1)    -- returns &amp;quot;a&amp;quot;&lt;br /&gt;
   text:sub(1,2)    -- returns &amp;quot;ab&amp;quot;&lt;br /&gt;
   text:sub(1,0)    -- returns &amp;quot;&amp;quot;&lt;br /&gt;
   text:sub(2,3)    -- returns &amp;quot;bc&amp;quot;&lt;br /&gt;
   text:sub(1,-1)   -- returns &amp;quot;abc123&amp;quot;&lt;br /&gt;
   text:sub(1,-2)   -- returns &amp;quot;abc12&amp;quot;&lt;br /&gt;
   text:sub(2,-2)   -- returns &amp;quot;bc12&amp;quot;&lt;br /&gt;
   text:sub(-2,-1)  -- returns &amp;quot;23&amp;quot;&lt;br /&gt;
   text:sub(-2,1)   -- returns &amp;quot;&amp;quot;&lt;br /&gt;
   text:sub(-2,6)   -- returns &amp;quot;23&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jeb</name></author>	</entry>

	</feed>