Difference between revisions of "Textutils (API)"
From ComputerCraft Wiki
m |
(Add links) |
||
Line 6: | Line 6: | ||
!style="background:#EEE" width="*"|Description | !style="background:#EEE" width="*"|Description | ||
|- | |- | ||
− | |textutils.slowPrint( text ) | + | |[[textutils.slowPrint|textutils.slowPrint( text )]] |
|Slowly prints the text. | |Slowly prints the text. | ||
|- | |- | ||
− | |textutils.slowWrite( text ) | + | |[[textutils.slowWrite|textutils.slowWrite( text )]] |
|Slowly writes the text. | |Slowly writes the text. | ||
|- | |- | ||
− | |textutils.formatTime( time, bTwentyFourHour) | + | |[[textutils.formatTime|textutils.formatTime( time, bTwentyFourHour)]] |
|Put a time into it, and it spews it out in a different format. For example: | |Put a time into it, and it spews it out in a different format. For example: | ||
local nTime = os.time() | local nTime = os.time() | ||
Line 18: | Line 18: | ||
print(textutils.formatTime( nTime, false )) | print(textutils.formatTime( nTime, false )) | ||
|- | |- | ||
− | |textutils.tabulate( table, table2, so on) | + | |[[textutils.tabulate|textutils.tabulate( table, table2, so on)]] |
|Prints tables in an ordered form. Each table is a row, columns' width is auto-adjusted. | |Prints tables in an ordered form. Each table is a row, columns' width is auto-adjusted. | ||
|- | |- | ||
− | |textutils.pagedTabulate( table, table2, so on) | + | |[[textutils.pagedTabulate|textutils.pagedTabulate( table, table2, so on)]] |
|<no description given> | |<no description given> | ||
|- | |- | ||
− | |textutils.serialize( t ) | + | |[[textutils.serialize|textutils.serialize( t )]] |
|Returns a string representation of the table t for storage or transmission. | |Returns a string representation of the table t for storage or transmission. | ||
|- | |- | ||
− | |textutils.unserialize( s ) | + | |[[textutils.unserialize|textutils.unserialize( s )]] |
|Returns a table reassembled from the string s. | |Returns a table reassembled from the string s. | ||
|- | |- | ||
− | |textutils.urlEncode( str ) | + | |[[textutils.urlEncode|textutils.urlEncode( str )]] |
|<no description given> | |<no description given> | ||
|} | |} | ||
[[Category:APIs]] | [[Category:APIs]] |
Revision as of 01:15, 8 July 2012
Text utilities is used to mess around with text easier.
Its functions include:
Method name | Description |
---|---|
textutils.slowPrint( text ) | Slowly prints the text. |
textutils.slowWrite( text ) | Slowly writes the text. |
textutils.formatTime( time, bTwentyFourHour) | Put a time into it, and it spews it out in a different format. For example:
local nTime = os.time() print(textutils.formatTime( nTime, false )) |
textutils.tabulate( table, table2, so on) | Prints tables in an ordered form. Each table is a row, columns' width is auto-adjusted. |
textutils.pagedTabulate( table, table2, so on) | <no description given> |
textutils.serialize( t ) | Returns a string representation of the table t for storage or transmission. |
textutils.unserialize( s ) | Returns a table reassembled from the string s. |
textutils.urlEncode( str ) | <no description given> |