Skip to content

Libraries

Stardust D.L edited this page Jan 19, 2018 · 2 revisions

Libraries

Collections

List

  • index(val)
  • has(val)
  • remove(val)
  • add(val)
  • clear()
  • insert(index,val)
  • removeAt(index)
  • reverse()

Tuple

  • index(val)
  • has(val)

Set

  • has(val)
  • remove(val)
  • add(val)
  • clear()

Stack

Use v=stack() in code

  • count()
  • top()
  • pop()
  • push(val)

Queue

Use v=queue() in code

  • count()
  • front()
  • pop()
  • push(val)

Math

Use math.<name> in code

  • sin(x)
  • cos(x)
  • tan(x)
  • atan(x)
  • asin(x)
  • acos(x)
  • ln(x)
  • log(base,x)
  • floor(x)
  • ceil(x)
  • round(x)
  • sign(x)
  • e
  • pi

Random

Use random.<name> in code

  • next() Return a random number
  • next(max) Return a random number smaller than max
  • next(min,max) Return a random number in [min,max)

String

Use string.<name> in code

  • split(basicStr,splitChar)
  • sub(basicStr,begin,count)
  • remove(basicStr,begin,[count])
  • padleft(basicStr,width,[char,default=' '])
  • padright(basicStr,width,[char,default=' '])
  • replace(basicStr,oldStr,newStr)
  • startsWith(basicStr,str)
  • endrsWith(basicStr,str)
  • isempty(str)

File

Use file.<name> in code

  • exists(path)
  • openEasyRead(path) Return a reader, use its next function to read
  • openEasyWrite(path) Return a writer, use its write and writeln functions to write
Clone this wiki locally