<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://greggsmith.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nikolajus</id>
		<title>SDU - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://greggsmith.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nikolajus"/>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Special:Contributions/Nikolajus"/>
		<updated>2026-09-23T09:10:55Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.1</generator>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Data_Type_Conversion&amp;diff=3537</id>
		<title>Data Type Conversion</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Data_Type_Conversion&amp;diff=3537"/>
				<updated>2008-11-18T13:23:04Z</updated>
		
		<summary type="html">&lt;p&gt;Nikolajus: adding float type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
This This article details how to convert from one data type to another in [[Spel Reference Guide|Spel code]]. This concept is regarded as ''casting''.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
Primary data types used in USD spel.&lt;br /&gt;
* string&lt;br /&gt;
* int&lt;br /&gt;
* float&lt;br /&gt;
* date&lt;br /&gt;
* duration&lt;br /&gt;
* uuid ''(introduced in r11.x)''&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;string MyString;&lt;br /&gt;
int MyInt;&lt;br /&gt;
float MyFloat;&lt;br /&gt;
date MyDate;&lt;br /&gt;
duration MyDuration;&lt;br /&gt;
uuid MyUUID;&lt;br /&gt;
&lt;br /&gt;
MyString = &amp;quot;Hello world no: &amp;quot; +(string) 1; // result: &amp;quot;Hello world no: 1&amp;quot;&lt;br /&gt;
MyInt = (int) &amp;quot;2 times&amp;quot;);  // result: 2&lt;br /&gt;
MyFloat = (float)MyInt; // result: 2.00000&lt;br /&gt;
MyDate = (date)( (string) now()); // result: the actual date depending of your system time configuration&lt;br /&gt;
MyDuration = (duration)((int) &amp;quot;2&amp;quot; + 3), // result: duration of 5 sec.&lt;br /&gt;
MyUUID = (uuid)expand( &amp;quot;&amp;amp;{'mylogin'=cnt.userid-&amp;gt;id}&amp;quot;); // result: the id of contact having userid &amp;quot;mylogin&amp;quot;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nikolajus</name></author>	</entry>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Substr&amp;diff=3333</id>
		<title>Substr</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Substr&amp;diff=3333"/>
				<updated>2008-10-02T12:25:18Z</updated>
		
		<summary type="html">&lt;p&gt;Nikolajus: fix missleading argument length.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
[[Category:Customizations]]&lt;br /&gt;
[[Category:r6]]&lt;br /&gt;
[[Category:r11]]&lt;br /&gt;
[[Category:Spel Code]]&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
Overloaded method to return a string within a string&lt;br /&gt;
&lt;br /&gt;
string substr(string str, int start, int length) &lt;br /&gt;
&lt;br /&gt;
string substr(string str, int start) // reads to the end of the string for finish &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used in conjuction with sindex to retrieve start index.&lt;br /&gt;
&lt;br /&gt;
eg.&lt;br /&gt;
&lt;br /&gt;
string myString;&lt;br /&gt;
&lt;br /&gt;
string otherString;&lt;br /&gt;
&lt;br /&gt;
otherString = &amp;quot;this is a string&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
myString = substr(otherString,sindex(otherString,&amp;quot;a&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
// myString == &amp;quot;a string&amp;quot;&lt;br /&gt;
&lt;br /&gt;
myString = substr(otherString,sindex(otherString,&amp;quot;is&amp;quot;,4));&lt;br /&gt;
&lt;br /&gt;
// myString == &amp;quot;is a&amp;quot;&lt;/div&gt;</summary>
		<author><name>Nikolajus</name></author>	</entry>

	</feed>