NameCategoryKindOriginSummary
Core—functionsbuiltinBase/core functions
printCorefunctionbuiltinPrint values
inputCorefunctionbuiltinAsk for user input
assertCorefunctionbuiltinSimple assertion
errorCorefunctionbuiltinCause runtime error
typeofCorefunctionbuiltinName of value types
tostringCorefunctionbuiltinConvert value to string
tonumberCorefunctionbuiltinConvert value to number
gcCorefunctionbuiltinGarbage collect
evalCorefunctionbuiltinEvaluate Tea source
dumpCorefunctionbuiltinTea function to bytecode
loadfileCorefunctionbuiltinLoad and parse file
loadstringCorefunctionbuiltinLoad and parse string
pcallCorefunctionbuiltinRun function in protected mode
rawequalCorefunctionbuiltinRaw equality
hasattrCorefunctionbuiltinCheck attribute presence
getattrCorefunctionbuiltinGet an attribute name
setattrCorefunctionbuiltinSet an attribute name
delattrCorefunctionbuiltinDelete an attribute name
Buffer—classbuiltinGrowable sequence of byte characters
Buffer.iterBuffermethodbuiltin?
Debug—modulemodulesInternal debug informations
debug.funcinfoDebugfunctionmodulesFunction header information
debug.funckDebugfunctionmodulesFunction constants pool
debug.funcbcDebugfunctionmodulesFunction bytecodes
debug.funcuvDebugfunctionmodulesFunction upvalues information
debug.funclineDebugfunctionmodulesFunction line information
IO—modulemodulesInput/output functionality
io.stdinIOattributemodulesInput file
io.stdoutIOattributemodulesOutput file
io.stderrIOattributemodulesOutput error file
io.openIOfunctionmodulesOpen a file
io.popenIOfunctionmodulesOpen a pipe
FileIOclassmodulesAn open file handle
File.writeIOmethodmodulesWrite values to file
File.readIOmethodmodulesRead from file
File.readlineIOmethodmodulesRead line from file
File.seekIOmethodmodulesMove file position indicator
File.flushIOmethodmodulesFlush file buffered data
File.setvbufIOmethodmodulesSet file buffering mode
File.closeIOmethodmodulesClose an open file
File.tostringIOmethodmodulesFile tostring
File.iterIOmethodmodulesFile iterator
List—classbuiltinOrdered collection values
List.lenListattributebuiltinNumber of elements
List.newListmethodbuiltinCreate new list
List.addListmethodbuiltinAppend values
List.removeListmethodbuiltinRemove specific value
List.deleteListmethodbuiltinDelete element at index
List.clearListmethodbuiltinEmpty a list
List.insertListmethodbuiltinInsert value at index
List.extendListmethodbuiltinConcatenate with another list
List.reverseListmethodbuiltinReverse list elements order
List.containsListmethodbuiltinCheck value presence
List.countListmethodbuiltinCount occurrences of value
List.fillListmethodbuiltinValue fill all elements
List.sortListmethodbuiltinSort all elements
List.indexListmethodbuiltinGet index of value
List.joinListmethodbuiltinJoin list into string
List.copyListmethodbuiltinGet shallow copy
List.findListmethodbuiltinFind first element
List.flatListmethodbuiltinFlatten sub-list elements
List.mapListmethodbuiltinMap new list
List.filterListmethodbuiltinFilter new list
List.reduceListmethodbuiltinReduce new list
List.foreachListmethodbuiltinCallback iterate
List.iterListmethodbuiltinList iterator
List.+ListoperatorbuiltinNew concatenated list
Map—classbuiltinKey-value pairs collection
Map.countMapattributebuiltinNumber of key-value entries
Map.keysMapattributebuiltinList of map keys
Map.valuesMapattributebuiltinList of map values
Map.newMapmethodbuiltinCreate new map
Map.getMapmethodbuiltinGet key’s value
Map.setMapmethodbuiltinSet/update key
Map.updateMapmethodbuiltinMerge key-values
Map.clear()MapmethodbuiltinClear all map entries
Map.containsMapmethodbuiltinCheck key presence
Map.deleteMapmethodbuiltinDelete key entry
Map.copyMapmethodbuiltinGet shallow copy
Map.foreachMapmethodbuiltinCallback iterate
Map.iterMapmethodbuiltinMap iterator
Map.+MapoperatorbuiltinNew merged map
Math—modulemodulesMaths
math.piMathattributemodulesThe mathematical constant π (pi)
math.tauMathattributemodulesThe mathematical constant τ (tau)
math.eMathattributemodulesThe mathematical constant e
math.phiMathattributemodulesThe golden ratio φ (phi)
math.infinityMathattributemodulesPositive infinity.
math.nanMathattributemodules“Not a Number”
math.maxintegerMathattributemodulesThe maximum safe integer.
math.minintegerMathattributemodulesThe minimum safe integer.
math.min()MathfunctionmodulesSmallest value among arguments
math.max()MathfunctionmodulesLargest value among arguments
math.mid()MathfunctionmodulesMiddle value
math.clamp()MathfunctionmodulesThe function clamp restricts a numeric value to a specified range.
math.floorMathfunctionmodulesThe function floor provides the largest integer less than or equal to a number.
math.ceilMathfunctionmodulesThe function ceil provides the smallest integer greater than or equal to a number.
math.roundMathfunctionmodulesRounds to nearest integer.
math.acosMathfunctionmodulesArc cosine in radians.
math.acoshMathfunctionmodulesInverse hyperbolic cosine
math.cosMathfunctionmodulesCosine in radians.
math.coshMathfunctionmodulesHyperbolic cosine
math.asinMathfunctionmodulesArc sine in radians.
math.asinhMathfunctionmodulesInverse hyperbolic sine
math.sinMathfunctionmodulesSine in radians
math.sinhMathfunctionmodulesHyperbolic sine
math.atanMathfunctionmodulesArc tangent in radians.
math.atanhMathfunctionmodulesInverse hyperbolic tangent
math.atan2MathfunctionmodulesArc tangent of two coordinates in radians
math.tanMathfunctionmodulesTangent in radians
math.tanhMathfunctionmodulesHyperbolic tangent
math.signMathfunctionmodulesSign of a number
math.absMathfunctionmodulesAbsolute value
math.sqrtMathfunctionmodulesSquare root
math.degMathfunctionmodulesConverts radians to degrees
math.radMathfunctionmodulesConverts from degrees to radians
math.expMathfunctionmodulese raised to the power of x
math.truncMathfunctionmodulesInteger part of number
math.frexpMathfunctionmodulesNormalized fraction and an exponent
math.ldexpMathfunctionmodulesx * 2^exp
math.logMathfunctionmodulesNatural logarithm (base e)
math.log1pMathfunctionmodulesNatural logarithm of 1 + x
math.log2MathfunctionmodulesBase-2 logarithm
math.log10MathfunctionmodulesBase-10 logarithm
math.classifyMathfunctionmodulesClassify floating-point value
math.isinfinityMathfunctionmodulesCheck for infinity
math.isnanMathfunctionmodulesCheck for “Not a Number”
OS—modulemodulesOS functions
os.nameOSattributemodulesSimple OS name
os.archOSattributemodulesSimple architecture name
os.envOSattributemodulesEnvironments map
os.getenvOSfunctionmodulesGet env variable
os.setenvOSfunctionmodulesSet env variable
os.executeOSfunctionmodulesSimple command execution
os.removeOSfunctionmodulesRemove file
os.renameOSfunctionmodulesRename file
os.mkdirOSfunctionmodulesCreate new directory
Random—modulemodulesPseudo-random number generation
random.seedRandomfunctionmodulesInit random number generator
random.randomRandomfunctionmodulesRandom number 0 to <1
random.boolRandomfunctionmodulesRandom bool
random.intRandomfunctionmodulesRandom ranged int number
random.numberRandomfunctionmodulesRandom ranged number
random.rangeRandomfunctionmodulesRandom number from range
random.choiceRandomfunctionmodulesRandom list element
random.shuffleRandomfunctionmodulesRandomly re-order list elements
Range—classbuiltinSequence of numbers, from start to end using step
Range.startRangeattributebuiltinStart interval
Range.endRangeattributebuiltinEnd interval
Range.stepRangeattributebuiltinStep interval
Range.lenRangeattributebuiltinRange length
Range.newRangemethodbuiltinCreate new range
Range.containsRangemethodbuiltinThe contains method checks whether the specified number is found within the original range.
Range.reverseRangemethodbuiltinReverse range intervals
Range.copyRangemethodbuiltinGet range copy
Range.iterRangemethodbuiltinRange iterator
String—classbuiltinA sequence of byte characters.
String.lenStringattributebuiltinByte length of a string.
String.upperStringmethodbuiltinUppercase a string
String.lowerStringmethodbuiltinLowercase a string
String.reverseStringmethodbuiltinReverse a string
String.splitStringmethodbuiltinSplit a string into a list
String.containsStringmethodbuiltinCheck presence of substring
String.startswithStringmethodbuiltinCheck presence of prefix
String.endswithStringmethodbuiltinCheck presence of suffix
String.leftstripStringmethodbuiltinStrip any leading white spaces
String.rightstripStringmethodbuiltinStrip any trailing white spaces
String.stripStringmethodbuiltinString leading and trailing white spaces
String.countStringmethodbuiltinCount presences of substring
String.findStringmethodbuiltinFind substring
String.replaceStringmethodbuiltinReplace occurrences of a string
Sys—modulemodulesThe sys module provides access to system-specific parameters and functions.
sys.bitsSysattributemodulesTarget architecture bits
sys.byteorderSysattributemodulesByte order
sys.argvSysattributemodulesCommand-line arguments
sys.versionSysattributemodulesVersion map
sys.loadersSysattributemodulesImporter loaders
sys.exit()SysfunctionmodulesExit program interpreter
Time—modulemodulesThe time module provides functions to interact with time.
time.sleepTimefunctionmodulesSuspend execution
time.clockTimefunctionmodulesProcessor time
time.formatTimefunctionmodulesCovert time into a string
time.timeTimefunctionmodulesCurrent timestamp
time.diffTimefunctionmodulestime.diff()
UTF-8—modulemodulesUnicode UTF-8 manipulation
utf8.lenUTF-8functionmodulesutf8.len()
utf8.charUTF-8functionmodulesutf8.char()
utf8.ordUTF-8functionmodulesutf8.ord()
utf8.reverseUTF-8functionmodulesutf8.reverse()
utf8.iterUTF-8functionmodulesutf8.iter()
FFI—modulebundledForeign function interface
ffi.cdefFFIfunctionbundledRegisters C types, typedefs and function prototypes.
ffi.loadFFIfunctionbundledLoads a shared library.
ffi.cnewFFIfunctionbundledAllocates a new C data object.
ffi.castFFIfunctionbundledConverts a value to a C type.
ffi.typeofFFIfunctionbundledReturns the C type of a value or declaration.
ffi.addressofFFIfunctionbundledReturns a pointer to the storage of a C data object.
ffi.gcFFIfunctionbundledSets the finalizer of a C data object.
ffi.sizeofFFIfunctionbundledReturns the size of a C type in bytes.
ffi.offsetofFFIfunctionbundledReturns the byte offset of a record field.
ffi.alignofFFIfunctionbundledReturns the alignment of a C type in bytes.
ffi.istypeFFIfunctionbundledChecks whether a C data object has a given type.
ffi.tonumberFFIfunctionbundledConverts scalar C data to a number.
ffi.stringFFIfunctionbundledReads a Teascript string from C memory.
ffi.copyFFIfunctionbundledCopies bytes into C memory.
ffi.fillFFIfunctionbundledFills C memory with a byte value.
ffi.errnoFFIfunctionbundledGets or sets the C errno value.
ffi.abiFFIfunctionbundledTests the target ABI.
ffi.CFFIattributebundledThe process C library.
CDataFFIclassbundledA value living in C memory.
CTypeFFIclassbundledA description of a C type.
CLibFFIclassbundledA loaded C shared library.
SQLite3—modulebundledEmbedded SQL database access through SQLite: open databases, run queries with bound parameters, use prepared statements and transactions.
sqlite3.openSQLite3functionbundledOpens a SQLite database.
DatabaseSQLite3classbundledAn open SQLite database connection.
Database.execSQLite3methodbundledExecutes one or more SQL statements.
Database.runSQLite3methodbundledExecutes a statement and reports its effect.
Database.querySQLite3methodbundledRuns a query and returns all rows.
Database.rowSQLite3methodbundledReturns the first row of a query.
Database.valueSQLite3methodbundledReturns the first column of the first row.
Database.prepareSQLite3methodbundledPrepares a reusable statement.
Database.transactionSQLite3methodbundledRuns a function inside a transaction.
Database.beginSQLite3methodbundledBegins a transaction.
Database.commitSQLite3methodbundledCommits the current transaction.
Database.rollbackSQLite3methodbundledRolls back the current transaction.
Database.closeSQLite3methodbundledCloses the database.
StatementSQLite3classbundledA prepared SQL statement that can be run repeatedly.
Statement.runSQLite3methodbundledExecutes the prepared statement.
Statement.querySQLite3methodbundledExecutes the prepared statement and returns all rows.
Statement.finalizeSQLite3methodbundledReleases the prepared statement.