SHIP:Sail:Functions

From Serious Documentation
Jump to: navigation, search

See Also:

Number Functions

Function Returns Introduced Description
max Integer/Float v4.0 Gets the maximum value of two or more numbers
min Integer/Float v4.0 Gets the minimum value of two or more numbers
  • abs - returns the absolute value of a number
  • max - returns the maximum of a set of numbers

|min||Integer/Float||style="text-align:center;"|v4.0||Gets the minimum value of two or more numbers - returns the minimum of a set of numbers

  • round - rounds a floating point number to then nearest whole integer (SHIPv5)
  • ceil - returns the smallest integer greater than or equal to a number (SHIPv5)
  • floor - returns the largest integer less than or equal to a number (SHIPv5)

String Functions

  • charAt - returns the single-character string at an index in a string
  • codepointAt - returns the Unicode-16 codepoint at an index in a string
  • codepointToString - converts a Unicode-16 codepoint to a single character string
  • indexOf - returns the index of the first occurrence of a string in another string
  • lastIndexOf - returns the index of the last occurrence of a string in another string
  • length - returns the length of a string
  • subStr - returns the N-character substring of a string starting at an index
  • subString - returns the substring of a string starting at an index and ending at an index
  • toLowerCase - converts a string to lower case
  • toUpperCase - converts a string to upper case
  • toString - converts a number to a string

Node Functions