Difference between revisions of "Textutils (API)"
From ComputerCraft Wiki
Line 14: | Line 14: | ||
|textutils.formatTime( time, bTwentyFourHour) | |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() | |
− | + | print(textutils.formatTime( nTime, false )) | |
|- | |- | ||
|textutils.tabulate( table, table2, so on) | |textutils.tabulate( table, table2, so on) |
Revision as of 20:20, 23 March 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 ) | <no description given> |
textutils.unserialize( s ) | <no description given> |
textutils.urlEncode( str ) | <no description given> |