MinitScript  0.9.31 PRE-BETA
README-Classes-API

LOGO

1. Classes - API

1.1. String class

                                                                                          Table of methods                                                                                          
 
STATIC METHODS
Create string
static String($string: String): String
Concatenate strings
static String::concatenate(...): String
Create string from byte array
static String::fromByteArray($byteArray: ByteArray): String
Create string from unicode code point
static String::fromCodePoint($codePoint: Integer): String
Generate string
static String::generate($what: String[, $count: Integer]): String
 
NON STATIC METHODS
Returns character of string at given position
charAt($index: Integer): String
Returns code point of string at given position
codePointAt($index: Integer): Integer
Test if string ends with specific string
endsWith($suffix: String): Boolean
Test if strings matches ignoring case sensitivity
equalsIgnoreCase($other: String): Boolean
Returns first index of specific string in string
firstIndexOf($what: String[, $beginIndex: Integer]): Integer
Returns first index of characters provided within given string in string
firstIndexOfChars($what: String[, $beginIndex: Integer]): Integer
Returns string length in number of characters
getLength(): Integer
Returns string size in bytes
getSize(): Integer
Indent string
indent($with: String, $count: Integer): String
Returns index of specific string in string
indexOf($what: String[, $beginIndex: Integer]): Integer
Test if string value is empty
isEmpty(): Boolean
Test if string value is a float number
isFloat(): Boolean
Test if string value is a integer number
isInteger(): Boolean
Returns last index of specific string in string
lastIndexOf($what: String[, $beginIndex: Integer]): Integer
Returns last index of characters provided within given string in string
lastIndexOfChars($what: String[, $endIndex: Integer]): Integer
Pad string left
padLeft($by: String, $toLength: Integer): String
Pad string right
padRight($by: String, $toLength: Integer): String
RegEx match
regexMatch($pattern: String[, &$matches: ?Array]): Boolean
RegEx replace
regexReplace($pattern: String, $by: String): String
RegEx search
regexSearch($pattern: String[, &$matches: ?Array]): Boolean
Replace specific string in string with given string
replace($what: String, $by: String[, $beginIndex: Integer]): String
Test if given string starts with specific string
startsWith($prefix: String): Boolean
Returns substring of string
substring($beginIndex: Integer[, $endIndex: Integer]): String
Convert string to byte array
toByteArray(): ByteArray
Compute lower case string of string
toLowerCase(): String
Compute upper case string of string
toUpperCase(): String
Tokenize string
tokenize($delimiters: String): Array
Trim string
trim(): String

1.2. Byte array class

                                                                                          Table of methods                                                                                          
 
STATIC METHODS
Create byte array
static ByteArray(): ByteArray
 
NON STATIC METHODS
Clear byte array
clear(): Null
Get read position
getReadPosition(): Integer
Returns size of byte array in bytes
getSize(): Integer
Get write position
getWritePosition(): Integer
Read boolean value and advance read position by 1 byte
readBool(): ?Boolean
Read 32 bit float value and advance read position by 4 bytes
readFloat(): ?Float
Read 16 bit integer value and advance read position by 2 bytes
readInt16(): ?Integer
Read 16 bit integer value and advance read position by 4 bytes
readInt32(): ?Integer
Read 64 bit integer value and advance read position by 8 bytes
readInt64(): ?Integer
Read 8 bit integer value and advance read position by 1 byte
readInt8(): ?Integer
Read a string with maximum size of 255 bytes
readLargeString(): ?String
Read a string with maximum size of 65535 bytes
readMediumString(): ?String
Read a string with maximum size of 4294967295 bytes
readSmallString(): ?String
Remove values from byte array
remove($index: Integer, $size: Integer): Null
Set read position
setReadPosition($position: Integer): Null
Set write position
setWritePosition($position: Integer): Null
Write boolean value and advance write position by 1 byte
writeBool($value: Boolean): Null
Write 32 bit float value and advance write position by 4 bytes
writeFloat($value: Integer): Null
Write 16 bit integer value and advance write position by 2 bytes
writeInt16($value: Integer): Null
Write 32 bit integer value and advance write position by 4 bytes
writeInt32($value: Integer): Null
Write 64 bit integer value and advance write position by 8 bytes
writeInt64($value: Integer): Null
Write 8 bit integer value and advance write position by 1 byte
writeInt8($value: Integer): Null
Write a string with maximum size of 255 bytes
writeLargeString($value: String): Null
Write a string with maximum size of 65535 bytes
writeMediumString($value: String): Null
Write a string with maximum size of 4294967295 bytes
writeSmallString($value: String): Null

1.3. Array class

                                                                                          Table of methods                                                                                          
 
STATIC METHODS
Create array
static Array(...): Array
 
NON STATIC METHODS
Clear array
clear(): Null
Returns if array contains a specific value
contains($value: Mixed): Boolean
Iterate array values, by using a (Lamda) function
forEach($callbackFunction: Function[, &$cookie: Mixed]): Null
Iterate range of array values, by using a (Lamda) function
forRange($callbackFunction: Function, $beginIndex: Integer[, $count: Integer[, $step: Integer[, &$cookie: Mixed]]]): Null
Get array entry
get($index: Integer): Mixed
Returns number of elements in array
getSize(): Integer
Get array index by value
indexOf($value: String[, $beginIndex: Integer]): Integer
Returns if array is empty
isEmpty(): Boolean
Add entry to array
push(...): Null
Remove array entry by index
remove($index: Integer): Null
Remove array entry by value
removeOf($value: String[, $beginIndex: Integer]): Null
Reverse array
reverse(): Null
Set array entry
set($index: Integer, $value: Mixed): Null
Sort array
sort($sortFunction: Function): Null

1.4. Map class

                                                                                          Table of methods                                                                                          
 
STATIC METHODS
Create map
static Map(): Map
 
NON STATIC METHODS
Clear map
clear(): Null
Returns if map contains specific key
contains($key: String): Boolean
Iterate map key and value pairs, by using a (Lamda) function
forEach($callbackFunction: Function[, &$cookie: Mixed]): Null
Get map value by key
get($key: String): Mixed
Get map keys
getKeys(): Array
Returns number of elements in map
getSize(): Integer
Get map values
getValues(): Array
Returns if map is empty
isEmpty(): Boolean
Remove map entry
remove($key: String): Null
Set map entry
set($key: String, $value: Mixed): Null

1.5. Set class

                                                                                          Table of methods                                                                                          
 
STATIC METHODS
Create set
static Set(): Set
 
NON STATIC METHODS
Clear set
clear(): Null
Returns if set contains specific key
contains($key: String): Boolean
Iterate set keys, by using a (Lamda) function
forEach($callbackFunction: Function[, &$cookie: Mixed]): Null
Get set keys
getKeys(): Array
Returns number of elements in set
getSize(): Integer
Insert key into set
insert($key: String): Null
Returns if set is empty
isEmpty(): Boolean
Remove key from set
remove($key: String): Null

1.6. HTTP download client class

                                                                                          Table of methods                                                                                          
 
STATIC METHODS
HTTP Download Client
static HTTPDownloadClient(): HTTPDownloadClient
 
NON STATIC METHODS
Cancel download
cancel(): Null
Get file URI
getFile(): String
Get GET parameters
getGETParameters(): Map
Get headers
getHeaders(): Map
Get password
getPassword(): String
Get progress
getProgress(): Float
Get response headers
getResponseHeaders(): Map
Get HTTP status code
getStatusCode(): Integer
Get URL
getURL(): String
Get username
getUserName(): String
Returns if download has been finished
isFinished(): Boolean
Wait until download thread has finished working
join(): Null
Reset HTTP download client
reset(): Null
Set file to save file downloaded to
setFile($url: String): Null
Set GET parameters
setGETParameters($getParameters: Map): Null
Set headers
setHeaders($headers: Map): Null
Set password
setPassword($password: String): Null
Set URL
setURL($url: String): Null
Set user name
setUserName($userName: String): Null
Start download
start(): Null

2. Links

2.1. Language Documentation

2.2. Other Links