<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ocr.michiyo.me/w/index.php?action=history&amp;feed=atom&amp;title=API%2Ftext</id>
	<title>API/text - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ocr.michiyo.me/w/index.php?action=history&amp;feed=atom&amp;title=API%2Ftext"/>
	<link rel="alternate" type="text/html" href="https://ocr.michiyo.me/w/index.php?title=API/text&amp;action=history"/>
	<updated>2026-08-24T13:45:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://ocr.michiyo.me/w/index.php?title=API/text&amp;diff=1054&amp;oldid=prev</id>
		<title>imported&gt;OCDoc Import: Imported from legacy OpenComputers documentation at ocdoc.cil.li</title>
		<link rel="alternate" type="text/html" href="https://ocr.michiyo.me/w/index.php?title=API/text&amp;diff=1054&amp;oldid=prev"/>
		<updated>2026-08-24T08:08:27Z</updated>

		<summary type="html">&lt;p&gt;Imported from legacy OpenComputers documentation at ocdoc.cil.li&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Text API =&lt;br /&gt;
&lt;br /&gt;
This API provides some more general operations on strings and data serialization into and back from strings.&lt;br /&gt;
&lt;br /&gt;
* `text.detab(value: string, tabWidth: number): string`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Converts tabs in a string to spaces, while aligning the tags at the specified tab width. This is used for formatting text in `term.write`, for example.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `text.padRight(value: string, length: number): string`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Pads a string with whitespace on the right up to the specified length.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `text.padLeft(value: string, length: number): string`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Pads a string with whitespace on the left up to the specified length.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `text.trim(value: string): string`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Removes whitespace characters from the start and end of a string.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `text.wrap(value:string, width:number, maxWidth:number)`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Wraps the provided string to specified width.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `text.wrappedLines(value:string, width:number, maxWidth:number)`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Returns a wrapper function around `text.wrap`.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `text.tokenize(value:string)`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Splits the input string into a table, using space as the delimiter.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Contents ==&lt;br /&gt;
&lt;br /&gt;
{{:API/contents}}&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>imported&gt;OCDoc Import</name></author>
	</entry>
</feed>