Function Reference
Function Reference
How to create a Function
To create your own funtions see the Function page.
Core Functions
If a link is red (unclickable) the function either doesnt exist yet and is pending creation or it has been created but does not yet have a page/example.
Language Features
- <Expression> =~ tr/searchList/replacementList/flags -- Translate characters from one character set to another similar to StrTr() function
- <Expression> =~ m/pattern/flags -- Match a string to a regular expression pattern and check if it matches and optionally return captured groups
- <Expression> =~ s/pattern/replacement/flags -- Replace parts of a string using a regular expression pattern and optionally executing functions on the matched groups
- Goto Label; & Label: -- Jump to another section of the script
- <Scope> List( <expressions>, .. ) = <array> -- Extract some elements from an array into ready to use variables
- $ptr[<index>]:<type> = <value> -- Read and Write to memory pointers similar to PTRRead() and PTRWrite() but using [] to simulate like it's an array
- Array Splicing -- Copy parts out of an array and return them as a new array
- Function Variables -- Dynamically create function source code and place it in a variable and call it from the variable
Parser Engine
- Parser Engine -- Parse text and have classes created and returned to you
- Parser( <grammar>, <tokenName>, <trimRules> ) -- Create a new parser
- Parse( <parser>, <text> ) -- Parse text with a parser created with Parser()
- IsToken( <object> ) -- Check if a given object is a token created from the parser
- TokenClass( <token> ) -- Get the class the token is linked to
Console Functions
- Echo( ) -- Alias for Print( )
- Say( ) -- Alias for Println( )
- Print( <expression> ) -- Prints an expressions string value to the console window
- Println( <expression> ) -- Prints an expressions string value to the console window and inserts a newline character at the end.
- Printf( <expression>, <expressions>... ) -- Print a formatted string (similar to the C printf() function)
- VPrintf( <expression>, <expressions>... ) -- Print a formatted string (similar to the C printf() function) using an array as the parameters
- PrintfC( <format control>, <params> ) -- Print a formatted string to the console window
- Input( <expression> ) -- Capture a string typed to console window
- InputC( <expression> ) -- Capture a char typed to console window
- Pause( <expression> ) -- Pause the execution of the script on the console window until any key is pressed
- Cls( ) -- Alias for ConsoleClear( )
- ConsoleClear( ) -- Clear all text from the console window
- ConsoleHide( ) -- Hide the console window
- ConsoleShow( ) -- Show the console window
- ConsoleState( ) -- Get the console state (Visible, Hidden)
- ConsoleBeep( <freq>, <duration> ) -- Plays the sound of a beep of a specified frequency and duration through the console speaker
- ConsoleSeek( <x>, <y> ) -- Set the position of the console cursor
- ConsoleBackColour( <colour> ) -- Set the background (behind text) colour of the console
- ConsoleForeColour( <colour> ) -- Set the foreground (text) colour of the console
- ConsoleBufferWidth( <newval> ) -- Get or Set the buffer width of the console window
- ConsoleBufferHeight( <newval> ) -- Get or Set the buffer height of the console window
- ConsoleWidth( <newval> ) -- Get or Set the width of the console window
- ConsoleHeight( <newval> ) -- Get or Set the height of the console window
- ConsoleTitle( <newtitle> ) -- Get or Set the title of the console window
- ConsoleCursorLeft( <newval> ) -- Gets or sets the column position of the cursor within the buffer area
- ConsoleCursorTop( <newval> ) -- Gets or sets the row position of the cursor within the buffer area
- ConsoleCursorSize( <newval> ) -- Gets or sets the height of the cursor within a character cell
- ConsoleCursorVisible( <newval> ) -- Gets or sets a value indicating whether the cursor is visible
Multi-Threading Functions
- ThreadCreate( <name>, <function>, <extra> ) -- Create a new thread and start it off executing a function or some code
- ThreadSleep( <name> ) -- Freeze a thread and make it sleep
- ThreadResume( <name> ) -- Unfreeze a thread and allow it to continue execution
- ThreadState( <name> ) -- Returns state of a thread
- ThreadKill( <name> ) -- Terminate a thread and remove it from the script
- ThreadExists( <name> ) -- Check if a thread exists by this name
- ThreadName( ) -- Returns the name of the current thread that is executing this code
- ThreadLock( <lockname> ) {} -- Locks a given section of code allowing only one thread to execute it at a time
- Threads( ) -- Return an array of all threads
Variable Type Conversions
- Bool( <expression> ) -- Returns the TRUE(1) or FALSE(0) representation of an expression
- Char( <expression> ) -- Returns the single letter representation of an expression
- Byte( <expression> ) -- Returns the unsigned 8-bit integer (whole number) representation of an expression
- SByte( <expression> ) -- Returns the signed 8-bit integer (whole number) representation of an expression
- Short( <expression> ) -- Returns the signed 16-bit integer (whole number) representation of an expression
- Int16( <expression> ) -- Returns the signed 16-bit integer (whole number) representation of an expression
- Int32( <expression> ) -- Returns the signed 32-bit integer (whole number) representation of an expression
- Int( <expression> ) -- Returns the signed 32-bit integer (whole number) representation of an expression
- Int64( <expression> ) -- Returns the signed 64-bit integer (whole number) representation of an expression
- Long( <expression> ) -- Returns the signed 64-bit integer (whole number) representation of an expression
- UShort( <expression> ) -- Returns the unsigned 16-bit integer (whole number) representation of an expression
- UInt16( <expression> ) -- Returns the unsigned 16-bit integer (whole number) representation of an expression
- UInt32( <expression> ) -- Returns the unsigned 32-bit integer (whole number) representation of an expression
- UInt( <expression> ) -- Returns the unsigned 32-bit integer (whole number) representation of an expression
- UInt64( <expression> ) -- Returns the unsigned 64-bit integer (whole number) representation of an expression
- ULong( <expression> ) -- Returns the unsigned 64-bit integer (whole number) representation of an expression
- Ptr( <expression> ) -- Returns the signed pointer representation of an expression
- IntPtr( <expression> ) -- Returns the signed pointer representation of an expression
- UPtr( <expression> ) -- Returns the unsigned pointer representation of an expression
- UIntPtr( <expression> ) -- Returns the unsigned pointer representation of an expression
- Float( <expression> ) -- Returns the 32-bit floating point representation of an expression
- Double( <expression> ) -- Returns the 64-bit floating point representation of an expression
- String( <expression> ) -- Returns the String representation of an expression
- Ascii( <expression> ) -- Returns the String (In raw ASCII) representation of an expression
- Binary( <expression> ) -- Returns the Binary (raw bytes) representation of an expression
Common Variable Functions
Misc
- IsSet( $variable ) -- Determine if a variable is set and is not NULL
- Unset( $variable ) -- Delete a variable
- Ref( $variable ) -- Retrieve the variable at the lowest depth in references that the current variable links to
- IsDeclared( <variable name>, <flag> ) -- Check if a variable has been declared
- Printr( $variable, <newline>, <flag> ) -- Prints all details about a variable in a way thats easy for humans to read it (Will print arrays etc)
- VarDump( $variable, <newline> ) -- Dumps information about a variable
- Assign( <varname>, <data>, <flag> ) -- Assigns a variable by name with the data
- Atof( <variable>, <count>, <start> ) -- Convert string to Double
- Atoi( <variable>, <count>, <start> ) -- Convert string to Int32
- Atol( <variable>, <count>, <start> ) -- Convert string to Int64
- StrTol( <variable>, <count>, <base>, <start> ) -- Convert string to Int64
- StrToul( <variable>, <count>, <base>, <start> ) -- Convert string to UInt64
- IsNan( <variable> ) -- Check if a floating pointer value is NaN (Not a number)
- IsInf( <variable> ) -- Check if a floating pointer value is Infinity
- IsPosInf( <variable> ) -- Check if a floating pointer value is Positive-Infinity
- IsNegInf( <variable> ) -- Check if a floating pointer value is Negative-Infinity
- IsNormal( <variable> ) -- Check if a floating pointer value is neither NaN, PosInf, NegInf or Inf
- SignBit( <variable> ) -- Returns whether the sign of a variable is negative
Type Checking
- isVar( $variable, <type>, <strict> ) -- Checks if a variable is a type (as a string) or inherits from a type (if not strict) (the same as $a ~~ Type)
- isVarChar( $variable ) -- Checks if a variable is a char type
- isVarBool( $variable ) -- Checks if a variable is a boolean type
- isVarByte( $variable ) -- Checks if a variable is an unsigned 8-bit integer type
- isVarSByte( $variable ) -- Checks if a variable is a signed 8-bit integer type
- isVarShort( $variable ) -- Checks if a variable is a signed 16-bit integer type
- isVarInt16( $variable ) -- Checks if a variable is a signed 16-bit integer type
- isVarInt( $variable ) -- Checks if a variable is a signed 32-bit integer type
- isVarInt32( $variable ) -- Checks if a variable is a signed 32-bit integer type
- isVarInt64( $variable ) -- Checks if a variable is a signed 64-bit integer type
- isVarLong( $variable ) -- Checks if a variable is a signed 64-bit integer type
- isVarUShort( $variable ) -- Checks if a variable is an unsigned 16-bit integer type
- isVarUInt16( $variable ) -- Checks if a variable is an unsigned 16-bit integer type
- isVarUInt( $variable ) -- Checks if a variable is an unsigned 32-bit integer type
- isVarUInt32( $variable ) -- Checks if a variable is an unsigned 32-bit integer type
- isVarUInt64( $variable ) -- Checks if a variable is an unsigned 64-bit integer type
- isVarULong( $variable ) -- Checks if a variable is an unsigned 64-bit integer type
- isVarFloat( $variable ) -- Checks if a variable is a single precision floating point type
- isVarFP( $variable ) -- Checks if a check if a variable type is only a float/double nothing else
- isVarDouble( $variable ) -- Checks if a variable is a double precision floating point type
- isVarPtr( $variable ) -- Checks if a variable is an signed pointer type
- isVarIntPtr( $variable ) -- Checks if a variable is an signed pointer type
- isVarUPtr( $variable ) -- Checks if a variable is an unsigned pointer type
- isVarUIntPtr( $variable ) -- Checks if a variable is an unsigned pointer type
- isVarString( $variable ) -- Checks if a variable is a string type
- isVarNumber( $variable ) -- Checks if a variable is any integer or float/double type
- isVarNull( $variable ) -- Checks if a variable is null
- isVarBinary( $variable ) -- Checks if a variable is a binary type
- isVarFunction( $variable ) -- Checks if a variable is a function type
- isVarRef( $variable ) -- Check if a variable is an reference to another variable
- isVarArray( $variable ) -- Check if a variable is an array
- isVarObj( $variable, <type> ) -- Check if a variable is an object type (This includes classes, file handles etc)
- isVarClass( $variable, <type> ) -- Check if a variable's object type is a class
- isVarDLLStruct( $variable ) -- Check if a variable holds a DLLStruct
- isVarGUIObject( $variable ) -- Check if a variable holds a GUI Object
- isVarServer( $variable ) -- Check if a variable holds a Server object from Listen()
- isVarClient( $variable ) -- Check if a variable holds a Client object from Connect()
- isVarClientSocket( $variable ) -- Check if a variable holds a Client socket object
- isVarSocket( $variable ) -- Check if a variable holds a Socket object
- isVarSigned( $variable ) -- Check if a variable holds a signed integer
- isVarUnsigned( $variable ) -- Check if a variable holds an unsigned integer
Get Type Directly
- GetVarType( $variable ) -- Get the common type of a variable
- GetVarTypeName( $variable ) -- Get the common type of a variable (as a string)
- GetVarObjType( $variable ) -- Get the common object type of a variable (If it is an object)
- GetVarObjTypeName( $variable ) -- Get the common object type of a variable (If it is an object) and return it as string
- GetVarGUIObjType( $variable ) -- Get the common object type of a variable (If it is a GUI object)
Binary Data Management Functions
- Bin( <args> ) -- Create a new binary variable
- BinaryCreate( <size>, <fill> ) -- Create a new binary variable and its array size and fill data type
- BinaryClone( <binary-array> ) -- Clone a binary variable 100% and return a new binary variable with exactly same data as the old one
- BinaryContains( <binary-array>, <needle>, <start>, <length> ) -- Check if a binary variable contains a given byte or contains another binary variable
- BinaryCRC32( <binary-array> ) -- Calculates the crc32 polynomial of a binary array
- BinaryWipe( <binary-array> ) -- Wipes a binary variables data 100% and sets the variable to a blank int containing null
- BinaryFill( <binary-array>, <fillWith>, <start>, <length> ) -- Fill a binary variables data (replace all of it or part of it) with a given byte or zero
- BinaryStr( <binary-array>, <separator> ) -- Create a Hex string from a binary array
- BinaryHex( <expression>, <flag> ) -- Create a binary array from a hex string
- BinaryLen( <binary-array>, <newLen> ) -- Returns the number of bytes in a binary variable (or increase it's capacity for bytes)
- BinaryGet( <binary-array>, <index> ) -- Get the byte at an index of a binary variable
- BinarySet( <binary-array>, <index>, <value> ) -- Set the byte at an index of a binary variable
- BinaryReverse( <binary-array>, <start>, <length> ) -- Reverse the order bytes a binary variable
- BinaryRemove( <binary-array>, <start>, <length> ) -- Remove bytes from a binary variable
- BinaryExpand( <binary-array> ) -- Expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable
- BinaryStartsWith( <binary-array>, <binary-array2> ) -- Check if this binary variable starts with a specific sequence of bytes
- BinaryEndsWith( <binary-array>, <binary-array2> ) -- Check if this binary variable ends with a specific sequence of bytes
- BinaryIndexOf( <binary-array>, <needle>, <start>, <length> ) -- Find the first occurrence of the needle
- BinaryIndexOfAny( <binary-array>, <needles>, <start>, <length> ) -- Find the first occurrence of any of the needles
- BinaryLastIndexOf( <binary-array>, <needle>, <start>, <length> ) -- Find the last occurrence of the needle
- BinaryLastIndexOfAny( <binary-array>, <needles>, <start>, <length> ) -- Find the last occurrence of any of the needles
- BinaryRandom( <binary-array>, <seed> ) -- Randomize all bytes in a binary variable
- BinaryReplace( <binary-array>, <needle>, <replacement>, <maxReplacements> ) -- Search for a byte or string of bytes in a binary variable and replace it
- BinaryHash( <binary-array> ) -- Gain a unique Hash of the bytes in this binary variable
- BinaryMid( <binary-array>, <start>, <length> ) -- Create a binary variable by extracting a number of bytes from another binary variable
- BinaryMidReplace( <binary-array>, <replacement>, <start>, <length> ) -- Replace a section (from start to length) of the binary with the replacement binary
- BinaryConcat( <values> ) -- Mass append a ton of Binary variables in an extremely fast and efficient way
- BinaryJoin( <separator>, <values>, <start>, <count> ) -- Create a new Binary by joining together a ton of Binary variables in an extremely fast and efficient way
- BinaryAppend( <binary-array>, <binary-array2>, <flag> ) -- Append a binary variables data onto the end or beginning of another binary variables data
- BinaryInsert( <binary-array>, <binary-array2>, <index>, <overwrite> ) -- Insert a binary variables data into another binary variable at a specific location
- BinaryUnshift( <binary-array>, <byte> ) -- Add a byte to the beginning of a binary variable
- BinaryPush( <binary-array>, <byte> ) -- Add a byte to the end of a binary variable
- BinaryShift( <binary-array> ) -- Delete the first byte from a binary variable
- BinaryPop( <binary-array> ) -- Delete the last byte from a binary variable
- BinaryResize( <binary-array>, <size>, <data> ) -- Resize a binary variables data array
- BinaryPadLeft( <binary-array>, <padSize>, <padWith> ) -- Left pad a binary variable with a number of bytes or pad it to a total number of bytes
- BinaryPadRight( <binary-array>, <padSize>, <padWith> ) -- Right pad a binary variable with a number of bytes or pad it to a total number of bytes
- BinarySHA1( <binary-array> ) -- Returns the SHA1 hash of a binary variable
- BinaryFromStr( <string>, <flag> ) -- Returns a new binary variable created from a strings raw bytes
- BinaryToStr( <binary-array>, <flag>, <start>, <length> ) -- Returns a new string containing the binary data as raw bytes
- BinaryMD5( <binary-array> ) -- Returns the MD5 hash of a binary variable
- BinaryCompare( <binary-array>, <offset>, <needle, <needleOffset>, <length>, <ignoreCase> ) -- Compare two binary variables
- BinaryCompress( <binary-array> ) -- Compress a binary variables data
- BinaryUncompress( <binary-array> ) -- Uncompress a binary variable data
- BinaryToLower( <binary-array> ) -- Convert any ASCII characters to lowercase
- BinaryToUpper( <binary-array> ) -- Convert any ASCII characters to uppercase
- BinaryTrim( <binary-array>, <trimBytes> ) -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left or right
- BinaryTrimLeft( <binary-array>, <trimBytes> ) -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the left
- BinaryTrimRight( <binary-array>, <trimBytes> ) -- Trim any single-byte ASCII characters '\r', '\n', '\t', and ' ' (or provide your own) to the right
- BinaryStripNull( <binary-array> ) -- Strip all NULL bytes (0x00) from a binary variable
- BinaryUUEncode( <binary-array> ) -- Encodes a binary variable using the uuencode algorithm
- BinaryUUDecode( <binary-array> ) -- Decodes a binary variable that was encode using the uuencode algorithm
- BinarySave( <binary-array>, <file>, <flag> ) -- Save a binary variable data to file
- BinaryLoad( <file>, <flag> ) -- Create a new binary variable by loading binary data from a file
Binary packer/unpacker
- Pack( <format>, <args> ) -- Pack data into a binary array
- Unpack( <format>, <data/binary-array>, <flag> ) -- Unpack data from a binary array
- PackSingle( <format>, <value> ) -- Pack a single value into a binary array
- UnpackSingle( <format>, <data/binary-array>, <position> ) -- Unpack a single value from a binary array optionally from a given index
Bit Vector
- Vec( <binary-array>, <offset>, <bits> ) -- Treats binary variable as a bit vector made up of elements of width bits and returns the value of the element specified by offset as an unsigned integer and optionally sets bits in the string to a given value
Bits
- SetBit( <binary-array>, <index>, <value> ) -- Set the bit at a given index
- GetBit( <binary-array>, <index> ) -- Get the bit at a given index
- InvertBit( <binary-array>, <index> ) -- Invert the bit at a given index
- ClearBit( <binary-array>, <index> ) -- Clear the bit at a given index
- FillBit( <binary-array>, <value> ) -- Set all bits to the value
BinHex 5.0
- BinHexEncode( <name>, <type>, <creator>, <resourceFork>, <dataFork>, <flag1>, <flag2> ) -- Encode data (usually a file) to BinHex 5.0 format
- BinHexDecode( <binhex-binary> ) -- Decode data (usually a file) from BinHex 5.0 format
ByteBuffer
The ByteBuffer is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc it works similar to the ByteBuffer in Java
- ByteBufferNew( <nothing/capacity/binary/byteBuffer> ) -- Make a new ByteBuffer
- ByteBufferGet( <byteBuffer>, <type>, <index> ) -- Get data from a ByteBuffer
- ByteBufferPut( <byteBuffer>, <type>, <variable> ) -- Add data to a ByteBuffer
- ByteBufferPeek( <byteBuffer>, <type> ) -- Peek at data from a ByteBuffer (same as get but without moving the position forward)
- ByteBufferGetBinary( <byteBuffer>, <offset>, <length> ) -- Get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)
- ByteBufferCapacity( <byteBuffer> ) -- Get the current capacity of a ByteBuffer
- ByteBufferRewind( <byteBuffer> ) -- Set the position of a ByteBuffer back to the start
- ByteBufferLimit( <byteBuffer> ) -- Get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer
- ByteBufferPosition( <byteBuffer>, <newPosition> ) -- Get and set the position of a ByteBuffer to any value
- ByteBufferRemaining( <byteBuffer> ) -- Get how many bytes are possible to read from current position of a ByteBuffer
- ByteBufferHasRemaining( <byteBuffer> ) -- Check if its possible to read at least one byte from the ByteBuffer
- ByteBufferClear( <byteBuffer> ) -- Clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded
- ByteBufferFlip( <byteBuffer> ) -- Flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded
- ByteBufferMark( <byteBuffer> ) -- Mark the position in a ByteBuffer
- ByteBufferReset( <byteBuffer> ) -- Reset the position to the previously marked position in a ByteBuffer
- ByteBufferCompare( <byteBuffer>, <byteBuffer> ) -- Compare two ByteBuffers to see if they are equal
- ByteBufferClone( <byteBuffer> ) -- Clone a ByteBuffer
- ByteBufferToBinary( <byteBuffer> ) -- Return a new binary variable from the data contained within the ByteBuffer
NBT (Named Binary Tag)
Functions on par with Minecrafts NBT system but greatly expanded to include many additional features and improvements specific for Sputnik.
- NBT( <value> ) -- Convert a variable into an accurate NBT representation of it
- NBTNew( <nbt-type>, <key>, <value> ) -- Create a new NBT of a given type and optionally give it a name and starting value
- NBTCompare( <nbt>, <nbt> ) -- Compare two NBT variables to see if they contain the same data
- NBTCopy( <nbt> ) -- Make a clone of an NBT
- NBTGetId( <nbt> ) -- Get the ID type of an NBT
- NBTGetName( <nbt> ) -- Get the name (tag key) of an NBT
- NBTGetName( <nbt>, <new-name> ) -- Set the name (tag key) of an NBT
- NBTHash( <nbt> ) -- Compute the CRC32 hash of an NBT
- NBTToString( <nbt> ) -- Return a string representation of an NBT
- NBTToVar( <nbt> ) -- Return the Sputnik variable representation of an NBT
- IsVarNBT( <value> ) -- Check if a variable is contains an NBT
NBTTagCompound
- NBTCompoundClear( <nbtCompound> ) -- Clear all tags
- NBTCompoundCount( <nbtCompound> ) -- Return the amount of tags
- NBTCompoundGet( <nbtCompound>, <tag> ) -- Get a tag by name
- NBTCompoundSet( <nbtCompound>, <tag>, <value> ) -- Set a tag by name
- NBTCompoundGetKeys( <nbtCompound> ) -- Get an array of all keys
- NBTCompoundGetTags( <nbtCompound> ) -- Get an array of all tags
- NBTCompoundGetMap( <nbtCompound> ) -- Get an associative array of all keys and tags
- NBTCompoundHasKey( <nbtCompound>, <tag> ) -- Check if a given tag exists by name
- NBTCompoundIsEmpty( <nbtCompound> ) -- Check if there are no tags
- NBTCompoundRemove( <nbtCompound>, <tag>, <value> ) -- Remove a specific tag by name
- NBTCompoundWrite( <nbtCompound>, <buffer> ) -- Write the NBTTagCompound to binary or a buffer
- NBTCompoundRead( <binary-variable/buffer> ) -- Create a new NBTTagCompound from a binary array or a buffer
- NBTCompoundWriteFile( <nbtCompound>, <file>, <compression ) -- Write the NBTTagCompound to a file
- NBTCompoundReadFile( <file> ) -- Create a new NBTTagCompound from reading a file
- NBTCompoundCompress( <nbtCompound> ) -- Compress the NBTTagCompound to binary
- NBTCompoundDecompress( <binary-variable> ) -- Decompress a NBTTagCompound from binary
- NBTCompoundWriteCompressed( <nbtCompound>, <buffer> ) -- Compress the NBTTagCompound and write it to a buffer
- NBTCompoundReadCompressed( <buffer> ) -- Decompress a NBTTagCompound from a buffer
NBTTagList/NBTTagListEx
- NBTListAppend( <nbtList>, <value> ) -- Add an NBT to the end of the list
- NBTListCount( <nbtList> ) -- Return how many tags exist in the list
- NBTListGet( <nbtList>, <index> ) -- Get a tag at the given index
- NBTListHasId( <nbtList>, <index> ) -- Check if an index is valid and contains a tag
- NBTListRemove( <nbtList>, <index> ) -- Remove the tag at the given index
Misc Binary Functions
- TB( <string> ) -- Convert a string of up to 4 chars into a 32-Bit unsigned number (network order)
- BT( <number> ) -- Convert a 32-Bit unsigned number (network order) into a string
Math Functions
- Abs( <expression> ) -- Calculates the absolute value of a number
- ACos( <expression> ) -- Calculates the arcCosine of a number
- ASin( <expression> ) -- Calculates the arcsine of a number
- ATan( <expression> ) -- Calculates the arctangent of a number
- ATan2( <expression>, <expression2> ) -- Compute arc tangent with two parameters
- Angle2D( <x1>, <y1>, <x2>, <y2> ) -- Calculates the angle of a line defined by two points on a 2D surface
- Barycentric( <value1>, <value2>, <value3>, <amount1>, <amount2> ) -- Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates
- CatmullRom( <value1>, <value2>, <value3>, <value4>, <amount> ) -- Performs a Catmull-Rom interpolation using the specified positions
- BaseConv( <number>, <frombase>, <tobase> ) -- Convert a number between arbitrary bases
- BitAND( <expression>, <expression2>, <n> ) -- Performs a bitwise AND operation
- BitNOT( <expression> ) -- Performs a bitwise NOT operation
- BitOR( <expression>, <expression2>, <n> ) -- Performs a bitwise OR operation
- BitSHIFT( <value>, <shift> ) -- Performs a bit shifting operation
- BitTripleSHIFT( <value>, <shift> ) -- Performs a triple bit shifting operation
- BitXOR( <expression>, <expression2>, <n> ) -- Performs a bitwise exclusive OR (XOR) operation
- BitROTATE( <expression>, <shift>, <size> ) -- Performs a bit shifting operation, with rotation
- BitSwap( <expression> ) -- Byte-swap (little-endian <-> big-endian)
- Ceiling( <expression> ) -- Returns a number rounded up to the next integer
- Clamp( <value>, <min>, <max> ) -- Clamps the specified value
- Cos( <expression> ) -- Calculates the cosine of a number
- Cosh( <expression> ) -- Returns the hyperbolic cosine of the specified angle
- DegreesToRadians( <value> ) -- Converts degrees to radians
- DegreesToRevolutions( <value> ) -- Converts degrees to revolutions
- Distance( <value1>, <value2> ) -- Calculates the absolute value of the difference of two values
- Distance2D( <x1>, <y1>, <x2>, <y2> ) -- Finds the distance between two points on a 2D surface
- Distance3D( <x1>, <y1>, <z1>, <x2>, <y2>, <z2> ) -- Finds the distance between two points on a 3D surface
- Exp( <expression> ) -- Returns e raised to the specified power
- Floor( <expression> ) -- Returns the largest integer less than or equal to the specified number
- frexp( <x> ) -- Returns m and e such that x = m2e, e is an integer and the absolute value of m is in the range [0.5, 1) (or zero when x is zero)
- Gauss( <amplitude>, <x>, <y>, <radX>, <radY>, <sigmaX>, <sigmaY> ) -- Get the result of the Gaussian function
- GradiansToRevolutions( <value> ) -- Converts gradians to revolutions
- GradiansToDegrees( <value> ) -- Converts gradians to degrees
- GradiansToRadians( <value> ) -- Converts gradians to radians
- Hermite( <value1>, <tangent1>, <value2>, <tangent2>, <amount> ) -- Performs a Hermite spline interpolation
- IsDivisible( <expression>, <divisor>, <flag> ) -- Check if an expression is divisible by a given divisor optionally comparing as double/int64
- IsOdd( <expression> ) -- Check if an expression is an odd number
- IsEven( <expression> ) -- Check if an expression is an even number
- IntToRom( <expression> ) -- Returns the roman numerical value of an integer
- ldexp( <m>, <n> ) -- Returns the value of m * 2^n
- Lerp( <from>, <to>, <amount> ) -- Interpolates between two values using a linear function by a given amount
- Log( <expression>, <newbase> ) -- Returns the logarithm of a specified number
- Log10( <expression> ) -- Returns the common (base-10) logarithm of a specified number
- Math( <expression> ) -- Parse a string containing mathematical equations
- Max( <expression>, <expression2> ) -- Find the greater number and return it
- Min( <expression>, <expression2> ) -- Find the lesser number and return it
- Mod( <expression>, <expression2> ) -- Performs the modulus operation
- Modf( <x>, <intpart> ) -- Breaks x into an integral and a fractional part
- Mod2PI( <value> ) -- Calculates the modulo 2*PI of the specified value
- MatlabMod( <expression>, <expression2> ) -- Performs the Matlab modulus operation
- Pow( <expression>, <expression2> ) -- Returns a specified number raised to the specified power
- RadiansToDegrees( <value> ) -- Converts radians to degrees
- RadiansToRevolutions( <value> ) -- Converts radians to revolutions
- RadiansToGradians( <value> ) -- Converts radians to gradians
- Random( <minValue>, <maxValue>, <flag> ) -- Get a random number from the defined area
- RandomVar( <seed>, <flag>, <flag> ) -- Generator a random number
- RandomSeed( <flag>, <size> ) -- Generator a cryptographically strong random number for use as a seed
- RandomSeedSet( <seed> ) -- Set the seed of Sputniks random number generator
- RevolutionsToDegrees( <value> ) -- Converts revolutions to degrees.
- RevolutionsToRadians( <value> ) -- Converts revolutions to radians.
- RevolutionsToGradians( <value> ) -- Converts revolutions to gradians.
- Round( <expression>, <decimalplaces> ) -- Returns a number rounded to a specified number of decimal places
- RomToInt( <expression> ) -- Returns the integer value of a roman numerical sequence
- Sin( <expression> ) -- Returns the sine of the specified angle
- Sinh( <expression> ) -- Returns the hyperbolic sine of the specified angle
- SmoothStep( <value1>, <value2>, <amount> ) -- Interpolates between two values using a cubic equation
- Sqrt( <expression> ) -- Returns the square root of a specified number
- Sum( <expressions> ) -- Returns the sum of all the parameters
- Tan( <expression> ) -- Returns the tangent of the specified angle
- Tanh( <expression> ) -- Returns the hyperbolic tangent of the specified angle
- Truncate( <expression> ) -- Calculates the integral part of a specified decimal number
- WithinEpsilson( <value1>, <value2>, <epsilon> ) -- Checks if value1 - value2 are almost equals within a float epsilon.
- Wrap( <value>, <min>, <max> ) -- Wraps the specified value into a range
- WrapAngle( <value> ) -- Reduces a given angle to a value between π and -π.
- IsPrime( <expression> ) -- Check if a number is a Prime number
String Functions
- AddCSlashes( <str>, <charlist> ) -- Escape a string with slashes in a C style
- AddBR( <str> ) -- Add HTML breaks to strings at newlines
- Asc( <char> ) -- Returns the ASCII code of a character
- AscW( <char> ) -- Returns the UNICODE code of a character
- AscArray( <char> ) -- Returns an array of ASCII characters of a string
- AscWArray( <char> ) -- Returns an array of UNICODE characters of a string
- Between( <haystack>, <firstneedle>, <secondneedle>, <case> ) -- Return the text between a start and end substring
- BCrypt( <expression>, <rounds> ) -- Hash a string (usually password) with BCrypt.
- BCryptVerify( <expression>, <hash> ) -- Verify a hash to a string (usually password) with BCrypt.
- CSetMatch( <expression>, <charset>, <case> ) -- Check if a string contains only characters from a substring(charset)
- CSetDel( <expression>, <charset>, <case> ) -- Delete all characters found in the charset from a string
- ChunkSplit( <body>, <chunklen>, <end> ) -- Split a string into smaller chunks
- Chop( <variable> ) -- Removes and returns the last character from a string
- Chomp( <variable> ) -- Removes trailing newlines and returns the number of characters removed
- CountChars( <string> ) -- Return information about characters used in a string
- CountWords( <string>, <format>, <charlist>, <outputArray> ) -- Return information about words used in a string
- Chr( <expression> ) -- Returns a character corresponding to an ASCII code
- ChrW( <expression> ) -- Returns a character corresponding to an UNICODE code
- ChrArray( <expression> ) -- Returns a string corresponding to an array ASCII codes
- ChrWArray( <expression> ) -- Returns a string corresponding to an array UNICODE codes
- CRC32( <string> ) -- Calculates the crc32 polynomial of a string
- Crypt( <string>, <salt> ) -- One-way string hashing
- Contains( <srting>, <string>, <casesense>) -- Check if string contains a sub string
- ContainsAny( <srting>, <array>, <casesense>) -- Check if string contains any of the given strings from an array
- CountFields( <string>, <delim>, <quote>, <quoteescape>, <comment>, <trimtype> ) -- Returns the number of values (fields) in the string passed that are separated by the separator string passed
- CSV( <string>, <delim>, <quote>, <quoteescape>, <comment>, <trimtype> ) -- Split strings and parse a CSV text into an array
- DecOct( <expression> ) -- Decimal to octal
- Dec( <expression> ) -- Returns a integer representation of a hexadecimal string
- FDec( <expression> ) -- Returns a float representation of a hexadecimal string
- DDec( <expression> ) -- Returns a double representation of a hexadecimal string
- DecPad( <expression>, <count> ) -- Pads numeric string to a given number of chars (Filling in the gap with zeros)
- DecryptString( <expression>, <password> ) -- Decrypt a string with a given password
- Decode64( <expression>, <strict> ) -- Decodes string with MIME base64
- Encode64( <expression> ) -- Encodes string with MIME base64
- Escape( <expression>, <custom> ) -- Add escapes to a string
- EscapeMeta( <expression>, <custom> ) -- Add escapes to meta characters
- EscapeShellArg( <arg> ) -- Escape a string to be used as a shell argument
- EscapeShellCmd( <command> ) -- Escape shell metacharacters
- EncryptString( <expression>, <password> ) -- Encrypt a string with a given password
- EndsWith( <expression>, <expression2>, <flag> ) -- Check if a string ends with a substring
- Hash( <expression> ) -- Generate a unique hash code for a string value
- Hebrev( <hebrew_text>, <max_chars_per_line> ) -- Convert logical Hebrew text to visual text
- Hebrevc( <hebrew_text>, <max_chars_per_line> ) -- Convert logical Hebrew text to visual text with newline conversion
- Hex2Str( <expression>, <flag> ) -- Convert a hex string back to a normal string
- Hex( <expression>, <length> ) -- Returns a string representation of an integer type converted to hexadecimal
- HTMLTranslationTable( <the_table>, <flags>, <encoding> ) -- Returns the translation table used by HTMLSpecialChars() and HTMLEntities()
- HTMLEntities( <string>, <flags>, <encoding>, <double_encode> ) -- Convert all applicable characters to HTML entities
- HTMLEntityDecode( <string>, <flags>, <encoding>, <double_encode> ) -- Convert all HTML entities to their applicable characters
- HTMLSpecialChars( <string>, <flags>, <encoding>, <double_encode> ) -- Convert special characters to HTML entities
- HTMLSpecialCharsDecode( <string>, <flags> ) -- Convert special HTML entities back to characters
- HTTPMakeQuery( <array> ) -- Converts an array into a properly formatted HTTP query string for use with requests etc
- HTTPParseQuery( <string> ) -- Parse an HTTP query string into an array
- Fmt( <format control>, <params> ) -- Create a formatted string
- FmtNumber( <number>, <decimals>, <dec_point>, <thousands_sep> ) -- Format a number with grouped thousands
- FHex( <expression> ) -- Returns a string representation of an float type converted to hexadecimal
- DHex( <expression> ) -- Returns a string representation of an double type converted to hexadecimal
- Find( <string>, <pattern>, <offset>, <plain> ) -- Search for a match in a string and return the match with its found position and length
- GMatch( <string>, <pattern>, <asKeypair>, <offset> ) -- Extract the patterns from a string and return as array or associative array
- GSub( <string>, <pattern>, <repl>, <max> ) -- Returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function)
- InStr( <string>, <substirng>, <casesense>, <occurrence>, <start> ) -- Checks if a string contains a given substring.
- isAlpha( <expression> ) -- Checks if string contains only Alphabetic characters
- isAlphaNumeric( <expression> ) -- Checks if string contains only AlphaNumeric(A-Z, 0-9), Characters
- isASCII( <expression> ) -- Check if string contains only ASCII chars
- isControl( <expression> ) -- Check if string contains only control chars
- isEmpty( <expression> ) -- Checks if a string is completely empty
- isEmptyOrNull( <expression> ) -- Checks if a string is completely empty or if the variable is null or if the variable translates to false (zero)
- IsGraph( <expression> ) -- Checks if a string is completely only characters that have a graphical representation
- isDigit( <expression> ) -- Checks if string only contains numbers
- isFloat( <expression> ) -- Check if string contains a floating point and could be converted
- isLower( <expression> ) -- Checks if string contains only lowercase letters
- isNumeric( <expression> ) -- Checks if string only contains numbers (Allows for float/double)
- isSpace( <expression> ) -- Check if string contains only whitespace
- isSymbol( <expression> ) -- Check if string contains only symbol chars
- IsPunctuation( <expression> ) -- Check if string contains only characters categorized as a punctuation marks
- IsSeparator( <expression> ) -- Check if string contains only characters categorized as a separator character
- IsBlank( <expression> ) -- Check if string contains only spaces and tabs
- isString( <expression> ) -- Check if variable contains only string chars
- isUpper( <expression> ) -- Check if string contains only uppercase chars
- isXDigit( <expression> ) -- Check if string contains only hex chars
- IndexOf( <expression>, <needle>, <pos>, <case>, <count> ) -- Reports the index of the first occurrence of the specified string in a string
- IndexOfAny( <expression>, <needle>, <pos>, <case>, <count> ) -- Reports the index of the first occurrence of any characters or array of strings in a specified string
- IndexNotOf( <expression>, <needle>, <pos>, <case>, <count> ) -- Reports the index of the first none occurrence of the specified string in the current string
- IndexNotOfAny( <expression>, <needle>, <pos>, <case>, <count> ) -- Reports the index of the first none occurrence of any characters or array of strings in a specified string
- LastIndexOf( <expression>, <needle>, <pos>, <case>, <count> ) -- Reports the index of the last occurrence of the specified string in the current string
- LastIndexOfAny( <expression>, <needle>, <pos>, <case>, <count> ) -- Reports the index of the last occurrence of any characters or array of strings in a specified string
- LastIndexNotOf( <expression>, <needle>, <pos>, <case>, <count> ) -- Reports the index of the last none occurrence of the specified string in the current string
- LastIndexNotOfAny( <expression>, <needle>, <pos>, <case>, <count> ) -- Reports the index of the last none occurrence of any characters or array of strings in a specified string
- JsonEncode( <value>, <options> ) -- Returns the JSON representation of a value
- JsonDecode( <value>, <options> ) -- Decodes a JSON string
- Levenshtein( <str1>, <str2>, <cost_ins>, <cost_rep>, <cost_de> ) -- Calculate Levenshtein distance between two strings
- LC( <expression> ) -- Returns string in all lower case
- LCFirst( <expression> ) -- Lower Cases first letter of string
- LCLast( <expression> ) -- Lower Cases last letter of string
- LCWords( <expression> ) -- Lower Cases first letter of each word in string
- Left( <expression>, <count> ) -- Returns a number of characters from the left-hand side of a string
- Lines( <expression> ) -- Returns an array containing all the lines from a string
- Match( <string>, <pattern>, <offset> ) -- Search for the first match of pattern in a string if found return the captures from the pattern
- Metaphone( <string>, <phonemes> ) -- Calculate the metaphone key of a string
- MD5( <expression> ) -- Creates MD5 Hash of specified string
- NthField( <string>, <delim>, <index>, <quote>, <quoteescape>, <comment>, <trimtype> ) -- Returns a field from a row of data (such as comma separated text)
- Ord( <char> ) -- Returns the ASCII code of a character
- OrdW( <char> ) -- Returns the UNICODE code of a character
- Oct( <string> ) -- Converts an octal string into the numerical corresponding value
- PadLeft( <expression>, <pad>, <count> ) -- Pad the left of a string a given number of times with another string
- PadRight( <expression>, <pad>, <count> ) -- Pad the right of a string a given number of times with another string
- PrintableEncode( <string ) -- Convert a quoted-printable string to an 8 bit string
- PrintableDecode( <string ) -- Convert a 8 bit string to a quoted-printable string
- RandStr( <count>, <allowEscapes>, <allowVariables>, <allowCode> ) -- Generate a random sequence of characters at a given length
- RegexMatch( <expression>, <pattern>, <matches>, <offset> ) -- Perform a regular expression match
- RegexReplace( <expression>, <pattern>, <replacement>, <limit>, <count>, <offset> ) -- Perform a regular expression search and replace
- RegexEscape( <expression>, <delimiter> ) -- Escape regular expression characters
- RegexUnescape( <expression> ) -- Remove any escapes regular expression characters
- ResolveStr( <expression>, <allowEscapes>, <allowVariables>, <allowCode> ) -- Treat a given string as if it was a Sputnik "string" and parse all stuff inside it such as $variables etc
- Repeat( <expression>, <count>, <flag> ) -- Create a new string or new array containing repeats of a string provided
- Replace( <expression>, <find>, <replace>, <case-sensitive-flag> ) -- Replace substrings within a string with other strings
- Reverse( <expression> ) -- Reverse all characters in a string
- RevHex( <expression> ) -- Reverse a string of hex digits
- Right( <expression>, <count> ) -- Returns a number of characters from the right-hand side of a string
- Rot13( <str> ) -- Perform the rot13 transform on a string
- Scanf( <expression>, <def> ) -- Parses input from a string according to a format
- SHA1( <expression> ) -- Returns SHA1 hash of string
- SimilarText( <first>, <second>, <percent> ) -- Calculates the similarity between two input strings and return a percentage of the matching between the two input strings
- Split( <expression>, <delim/pattern>, <flag> ) -- Splits up a string into substrings depending on the given delimiters.
- SPrintf( <format control>, <params>... ) -- Returns a formatted string (similar to the C sprintf() function)
- StartsWith( <expression>, <expression2>, <flag> ) -- Check if a string starts with a substring
- StrChr( <haystack>, <char>, <start> ) -- Locate first occurrence of character in string
- StrrChr( <haystack>, <char>, <start> ) -- Locate last occurrence of character in string
- StrShuffle( <str> ) -- Randomly shuffles a string
- Strpbrk( <haystack>, <needle>, <start> ) -- Locate a list of possible characters in string and return the position of it
- StripCSlashes( <str> ) -- Unescape string escaped with AddCSlashes()
- StripTags( <str>, <allowable_tags> ) -- Strip HTML tags from a string
- StripWS( <str>, <flags>, <charList> ) -- Strips the white space in a string or given characters.
- StrSpn( <subject>, <mask>, <start>, <length> ) -- Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask
- StrCSpn( <subject>, <mask>, <start>, <length> ) -- Find length of initial segment not matching mask
- StrCmp( <str1>, <str2>, <ignoreCase> ) -- String comparison
- StrNatCmp( <str1>, <str2>, <ignoreCase> ) -- String comparisons using a "natural order" algorithm
- StrVersCmp( <str1>, <str2>, <ignoreCase> ) -- String comparison holding name and indices/version numbers
- Soundex( <str> ) -- Calculate the soundex key of a string
- Str2Hex( <expression>, <flag> ) -- Convert a string to a hex string
- StrInsert( <expression>, <index>, <expression2> ) -- Insert a string at a given index of another string and return the new string
- StrIndex( <expression>, <index>, <value> ) -- Get or set a char from/to a string at a specific index
- StrPos( <haystack>, <needle>, <offset>, <flags> ) -- Find the position of the first/last occurrence of a substring in a string
- StrTr( <str>, <from> <to>, <replace_pairs> ) -- Translate characters or replace substrings
- StrTok( <str/token>, <token> ) -- Tokenize string
- StrStr( <haystack>, <needle>, <before_needle>, <find_last>, <case> ) -- Find the first/last occurrence of a string
- StrLen( <expression> ) -- Returns length of specified string
- SubStr( <expression>, <start>, <count>, <replacement> ) -- Return part of a string or replace it
- SubStrCount( <expression>, <expression2>, <offset>, <length>, <flag> ) -- Count the number of substring occurrences
- SubStrCmp( <main_str>, <str>, <offset>, <length>, <ignoreCase> ) -- Comparison of two strings from an offset, up to length characters
- SubStrReplace( <expression>, <replacement>, <start>, <length> ) -- Replace text within a portion of a string
- Sub( <expression>, <start>, <end>, <replacement> ) -- Return part of a string or replace it
- StrSplit( <expression>, <split_length>, <flag> ) -- Convert a string to an array
- StrCompress( <expression> ) -- Compress a string
- StrUncompress( <expression> ) -- Uncompress a string
- Trim( <expression>, <chars> ) -- Removes whitespace from the beginning and end of a string
- TrimLeft( <expression>, <chars> ) -- Strip whitespace from the start of a string
- TrimRight( <expression>, <chars> ) -- Strip whitespace from the end of a string
- UC( <expression> ) -- Returns string in all Upper Case
- UCFirst( <expression> ) -- Upper Cases first letter of string
- UCLast( <expression> ) -- Upper Cases last letter of string
- UCWords( <expression> ) -- Upper Cases first letter of each word in string
- UUEncode( <expression> ) -- Encodes a string using the uuencode algorithm
- UUDecode( <expression> ) -- Decodes a string that was encode using the uuencode algorithm
- Unescape( <expression>, <custom> ) -- Remove all escapes from a string
- VSPrintf( <format control>, <params>... ) -- Returns a formatted string (similar to the C sprintf() function) but accepts arrays as the arguments
- WordWrap( <str>, <width>, <break>, <cut> ) -- Wraps a string to a given number of characters
CharPtr Functions
Note the Fixed statement is tied directly with CharPtr
- StrNew( <char>, <length>, <flag> -- Create a new string of a given length filled with a given char (or optionally return it as a CharPtr rather than a new string)
- CharCopy( <dest>, <src>, <length> ) -- Copy a length of characters from the source pointer to the destination pointer
- CharCopyRev( <dest>, <src>, <length> ) -- Copy a length of characters from the source pointer to the destination pointer (in reverse so Hello becomes olleH)
Array Functions
- SameValues( <array> ) -- Check if all values within an array are the same value type such as all String and return the type or return error type
- ArrayScope( <array>, <scope> ) -- Get or Set an arrays internal Sputnik scope (Only to be used by Sputnik library developers)
- IsHash( <array> ) -- Check if all the keys in an array are Strings rather than numeric (Making it a full hashmap rather than full array or mixed)
- IsArray( <array> ) -- Check if all the keys in an array are Numeric and none are String (Making it a full array rather than full hashmap or mixed)
- IsList( <array> ) -- Same as IsArray but also checks to make sure the keys start at 0 and end at the highest with no gaps which makes it a perfect list
- Array( <expressions> ) -- Create a new array
- Clear( <array>, <flag> ) -- Remove all items from an array
- Join( <array>, <separator> ) -- Join an array into a string with an optional separator
- JoinKV( <array>, <separator> ) -- Join an array (as keys and values) into a string with an optional separator
- Count( <array/binary-array> ) -- Returns the size of array (How many elements it currently has stored)
- Fill( <start>, <num>, <value> ) -- Fill an array with values
- FillKeys( <keys>, <value> ) -- Fill an array with values, specifying keys
- UBound( <array/binary-array> ) -- Returns the index of the highest element in an array
- LBound( <array/binary-array> ) -- Returns the index of the lowest element in an array
- Push( <array>, <expressions> ) -- Add items to the end of an array
- PushArray( <array>, <expressions> ) -- Add arrays to the end of an array
- Insert( <array>, <id>, <expressions> ) -- Add items to an array at a given location
- InsertArray( <array>, <id>, <arrays> ) -- Add arrays to an array at a given location
- Pad( <array>, <size>, <value> ) -- Pad array to the specified length with a value
- Unshift( <array>, <expressions> ) -- Add items to the beginning of an array
- UnshiftArray( <array>, <expressions> ) -- Add arrays to the beginning of an array
- Pop( <array> ) -- Delete the last item in an array
- Shift( <array> ) -- Delete the first item in an array
- Range( <start>, <end>, <step> ) -- Create an array containing a range of elements
- Remove( <array>, <start-id>, <end-id> ) -- Delete items from an array starting at a given location and stopping at a given location
- RemoveValue( <array>, <needle>, <useStrict>, <removeAll>, <recursive>, <returnCopy> ) -- Remove a specific value or all matching values from an array
- RemoveValues( <array>, <needles>, <useStrict>, <removeAll>, <recursive>, <returnCopy> ) -- Remove an array of specific values from an array
- RemoveKey( <array>, <key>, <returnCopy> ) -- Remove a specific key from an array
- RemoveKeys( <array>, <keys>, <returnCopy> ) -- Remove an array of keys from an recursively from an array
- IsIndexSet( <array>, <index> ) -- Check if an element exist at a given index ID within an array
- Grep( <array>, <pattern>, <flag> ) -- Returns a new array consisting of the elements of the input arrays values that match the given regex pattern
- GrepKeys( <array>, <pattern>, <flag> ) -- Returns a new array consisting of the elements of the input arrays keys that match the given regex pattern
- Search( <array>, <value>, <flag>, <invert_flag>, <returnKeys> ) -- Returns a new array consisting of the elements of the input array that match the given value
- Combine( <array-keys>, <array-values> ) -- Creates a hash (Dictionary) by using the values from the keys array as keys and the values from the values array as the corresponding values
- Walk( <array>, <function> ) -- Walk through the arrays items and execute a user defined function on each one
- Rev( <array> ) -- Returns a new array consisting of the reverse of another array
- IsKeySet( <array>, <key> ) -- Check if given key exists within an array
- IsKeysSet( <array>, <keys>, <flag> ) -- Check if any/all/none of a given key from a key array was found inside an array
- Keys( <array>, <flag> ) -- Create an array containing all KEYS from an array
- Values( <array>, <flag> ) -- Create an array containing all VALUES from an array
- InArray( <array>, <needle>, <strict>, <flag> ) -- Checks if a value exists in an array
- Flip( <array> ) -- Exchanges all keys with their associated values in an array
- Splice( <array>, <offset>, <length>, <replace_with> ) -- Cut out and return a chunk or portion of an array and optionally replace the cut out section with new data.
- Order( <array>, <flag> ) -- Fix the order of numeric array elements from 0 to whatever.
- Sort( <array>, <flag>, <function> ) -- Sort an array by value or keys optionally modify it in place or return new and optionally use a custom function to decide how to sort it
- CountValues( <array> ) -- Counts all the values of an array
- SumKeys( <array> ) -- Counts the sum total of all the keys of an array
- SumValues( <array> ) -- Counts the sum total of all the values of an array
- IndexOfValue( <array>, <needle>, <strict>, <ignoreCase>, <skipStringKeys> ) -- Checks if a value exists in an array and returns its index value
- IndexOfValueAny( <array>, <needle>, <strict>, <ignoreCase>, <skipStringKeys> ) -- Checks if a value (from an array) exists in an array and returns its index value
- IndexNotOfValue( <array>, <needle>, <strict>, <ignoreCase>, <skipStringKeys> ) -- Checks for the non-occurrence of a value in an array and returns the first index that does not contain the value
- IndexNotOfValueAny( <array>, <needle>, <strict>, <ignoreCase>, <skipStringKeys> ) -- Checks for the non-occurrence of a value (from an array) in an array and returns the first index that does not contain any of the values
- LastIndexOfValue( <array>, <needle>, <strict>, <ignoreCase>, <skipStringKeys> ) -- Checks if a value exists in an array and returns the index of the last occurrence of the value
- LastIndexOfValueAny( <array>, <needle>, <strict>, <ignoreCase>, <skipStringKeys> ) -- Checks if a value (from an array of values) exists in an array and returns the index of the last occurrence of the value (from the value array)
- LastIndexNotOfValue( <array>, <needle>, <strict>, <ignoreCase>, <skipStringKeys> ) -- Checks for the non-occurrence of a value in an array and returns the last index that does not contain the value
Linq (Integrated Language Query) Functions
- Where( <array>, <query> ) -- Filters an array based on a predicate
Enum Functions
- Enumerate( <enum> ) -- Cycle through all Name + Values in an enum
- EnumKey( <enum>, <value> ) -- Return the string KEY for a given integer value
- EnumValue( <enum>, <value> ) -- Return the integer value for a given string KEY
- EnumAdd( <enum>, <key>, <value> ) -- Add a new key and value to an existing enum
- EnumDel( <enum>, <key> ) -- Delete a key and value from an existing enum
- EnumIsDefined( <enum>, <value> ) -- Check if a given value exists within an enum
Process Functions
- DLLCall( <Dll/DLLName>, <FunctionName/Alias>, <ReturnType>, <ParameterType>, <CharSet/CallingConvention>, <Parms> ) -- Dynamically call a function in a DLL
- DLLOpen( <DLLName>, <FunctionName/Alias>, <ReturnType>, <ParameterType>, <CharSet/CallingConvention> ) -- Open a DLL and get a function from it and return it as a ready to call object function that is already compiled (vastly speeding up the repeat call speed)
- DLLClose( <DLL> ) -- Close and unset a return value from DLLOpen()
- DLLImport( <varies...> ) -- Dynamically load a function from a DLL and transform it to act and behave like a normal Sputnik function (Can load thousands functions at a time and even save the loaded stuff to DLL for quick access later)
- Exec( <command>, <output>, <return_var> ) -- Execute an external program
- ExecShell( <command> ) -- Execute command via shell and return the complete output as a string
- ExecSystem( <command>, <return_var> ) -- Execute an external program and display the output
- Passthru( <command>, <return_var> ) -- Execute an external program and display raw output
- System( <expression> ) -- Execute system command
- Run( <file>, <arguments>, <workdir>, <flag>, <show options> ) -- Runs an external program
- RunWait( <file>, <timeout>, <arguments>, <workdir>, <flag>, <show options> ) -- Runs an external program and waits until the program finishes
- RunShell( <file>, <arguments>, <workdir>, <flag>, <show options> ) -- Runs an external program (Using ShellExecute)
- RunShellWait( <file>, <timeout>, <arguments>, <workdir>, <flag>, <show options> ) -- Runs an external program (Using ShellExecute) and waits until the program finishes
- RunAsSet( <user>, <domain>, <password>, <options> ) -- Initialise a set of user credentials to use during Run and RunWait operations.
- RunCapture( <file>, <arguments>, <workdir>, <flag>, <function> ) -- Run a program in a hidden window and capture its printed output as strings
- PHandle( ) -- Get the process handle of this program
- ProcessClose( <pid/name> ) -- Terminates a named process
- ProcessID( <name> ) -- Gets the process ID of a given name
- ProcessExists( <pid/name> ) -- Checks to see if a specified process exists
- ProcessList( <name> ) -- Returns an array listing the currently running processes (names and PIDs)
- ProcessSetPriority( <pid/name>, <priority> ) -- Changes the priority of a process
- ProcessWait( <pid/name>, <timeout> ) -- Pauses the current thread until a given process exists or optional the timeout expires
- ProcessWaitClose( <pid/name>, <timeout> ) -- Pauses the current thread until a given process no longer exists or optional the timeout expires
- Shutdown( <shutdown code> ) -- Shuts down the system
- Debug( <flag> ) -- Enter or leave debug mode in debug state the program can interact with operating system processes that run in a special mode by enabling the native property SeDebugPrivilege on the current thread
Environment Management
- EnvExpand( <expression> ) -- Convert a string containing %name% env tags and return complete string with names resolved
- EnvGet( <tag> ) -- Get the value of an environment variable
- EnvSet( <tag>, <expression> ) -- Set the value of an environment variable
- EnvUpdate( ) -- Refreshes the OS environment
File Functions
File Create/Read/Write Functions
- FileOpen( <FileName>, <flag> ) -- Opens a file for reading or writing
- FileClose( <file> ) -- Closes a previously opened file
- FileWrite( <file>, <expression>, <useAscii> ) -- Write text to previously opened file at the current File Steam pointer location
- FileWriteBinary( <file>, <binary-array> ) -- Write the data from a binary variable to previously opened file at the current File Steam pointer location
- FileAppend( <file>, <expression>, <useAscii> ) -- Append a line of text to the end of a previously opened text file
- FileAppendBinary( <file>, <binary-array> ) -- Append the data from a binary variable to the end of a previously opened file
- FileSeek( <file>, <offset>, <flag> ) -- Change the POSITION of the File Stream pointer
- FilePos( <file> ) -- Get the current POSITION of the File Stream pointer
- FileRead( <file>, <expression> ) -- Read a number of bytes from a text file starting from current File Steam pointer location and return them as a string
- FileReadBinary( <file>, <expression> ) -- Read a number of bytes from a file starting from current File Steam pointer location
- FileReadLine( <file>, <expression> ) -- Read a line of text from a text file (Or specify a name of a file)
- FileReadLines( <file> ) -- Read all lines of text from a text file (Or specify a name of a file)
- FileSave( <file>, <expression>, <useAscii> ) -- Save all text to a file
- FileLoad( <file> ) -- Load all text from a file
Misc
- [[Core Function FileMove|FileMove(
Invalid language.
You need to specify a language like this: <source lang="html4strict">...</source>
Supported languages for syntax highlighting:
4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, oobas, oracle11, oracle8, oxygene, oz, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sputnik, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, uscript, vala, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic