Difference between revisions of "SHIP:Sail:Functions"

From Serious Documentation
Jump to: navigation, search
Line 25: Line 25:
 
{{SailFuncTableStart|}}
 
{{SailFuncTableStart|}}
 
{{:SHIP:Sail:charAt}}
 
{{:SHIP:Sail:charAt}}
|+
 
{{:SHIP:Sail:codepointAt}}
 
 
|}
 
|}
  

Revision as of 06:57, 13 July 2014

See Also:

Number Functions

Function Returns Introduced Description
abs Integer/Float v4.0 Gets the absolute value of a number
ceil Integer v5.0 Gets the smallest integer greater than or equal to a number
floor Integer v5.0 Gets the largest integer less than or equal to a number
ftoi Integer v5.0 Casts a Float to an Integer
itof Integer v5.0 Explicitly casts an Integer to a Float
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
round Integer v5.0 Gets the nearest integer to a number

String Functions

Function Returns Introduced Description
charAt String v4.0 Returns the single character string extracted from a specified index in another string. This is a simplified version of subStr and provided for completeness in the API.
  • 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