<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FCommunity%2FScripting%2FClasses%2Ftstring</id>
	<title>HPL3/Community/Scripting/Classes/tstring - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FCommunity%2FScripting%2FClasses%2Ftstring"/>
	<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/Community/Scripting/Classes/tstring&amp;action=history"/>
	<updated>2026-05-14T21:13:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL3/Community/Scripting/Classes/tstring&amp;diff=2476&amp;oldid=prev</id>
		<title>Maintenance script: Upload classes to sub</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/Community/Scripting/Classes/tstring&amp;diff=2476&amp;oldid=prev"/>
		<updated>2020-07-30T09:12:23Z</updated>

		<summary type="html">&lt;p&gt;Upload classes to sub&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==tString==&lt;br /&gt;
&lt;br /&gt;
===Fields===&lt;br /&gt;
&lt;br /&gt;
tString has no public fields.&lt;br /&gt;
&lt;br /&gt;
===Functions===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=1&lt;br /&gt;
! Return Type !! Function Name !! Parameters !! Description &lt;br /&gt;
|-&lt;br /&gt;
|  uint64  ||  length  ||  const  ||  Returns the length of the tString. &lt;br /&gt;
|-&lt;br /&gt;
|  void  ||  resize  ||  uint64  ||  Resizes the tString, removing characters and adding null characters as necessary. &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Remarks===&lt;br /&gt;
&lt;br /&gt;
A tString is the HPL3 type for storing strings, or sequences of characters. They are created through use of a string literal, or a series of characters surrounded by quotation marks ( &amp;quot; ).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;tString sStr = &amp;quot;This is a string.&amp;quot;;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A thing to note is that a tString is essentially a wrapper for an array of characters, meaning that you can retrieve characters within a tString by using square bracket ( [ ] ) syntax. (Characters in the HPL3 engine are represented by unsigned 8-bit integers, or ''uint8''.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;uint8 c = sStr[1];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A tString is [[wp&amp;gt;Null-terminated_string|null-terminated]], meaning that when a tString is read (for example, in a cLux_AddDebugMessage function), the tString will only process its characters until it reaches a null-character, and characters after the null-character, if any, are ignored.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;sStr.resize(5);&lt;br /&gt;
sStr[0] = 'H';&lt;br /&gt;
sStr[1] = 'i';&lt;br /&gt;
sStr[2] = '\0'; // This is a null-character&lt;br /&gt;
sStr[3] = 'Q';&lt;br /&gt;
sStr[4] = '9';&lt;br /&gt;
cLux_AddDebugMessage(sStr);&lt;br /&gt;
&lt;br /&gt;
// The message as printed:&lt;br /&gt;
'' Hi&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
		
	</entry>
</feed>