This library is a port of common python features/ functions to AppGamekit
Download "AppGameKitUtils.agc", place it in your project folder and add this line to your "main.agc": #include "AppGameKitUtils.agc"
- true
- false
- null
- NL
- PI
- remainder
description: Returns remainder of two supplied numbers
usage:remainder(number1,number2)
types:remainder(integer/float,integer/float) -> integer/float
- factorial
description: Returns factorial of given number
usage:factorial(number)
types:factorial(integer) -> integer
- comb
description: Returns the number of ways picking k unordered outcomes from n possibilities, without repetition
usage:comb(number1,number2)
types:comb(integer/float,integer/float) -> integer/float
- copysign
description: Returns a number consisting of magnitude from parameter x and the sign from parameter y.
usage:copysign(number1,number2)
types:copysign(integer/float,integer/float) -> integer/float
- gcd
description: Returns the greatest common divisor of two given numbers
usage:gcd(number1,number2)
types:gcd(integer/float,integer/float) -> integer/float
- prodI
description: Returns the product of an integer array from the starting element
usage:prodI(integer_array,starting_index)
types:prodI(integer[],integer) -> integer
- prod#
description: Returns the product of a float array from the starting element
usage:prod#(float_array,starting_index)
types:prod#(float[],integer) -> float
- rad
description: Converts degrees to radians
usage:rad(degrees)
types:rad(integer/float) -> float
- deg
description: Converts radians to degrees
usage:deg(radians)
types:deg(integer/float) -> float
- join
description: Joins given string array with supplied delimeter
usage:join(string_array,delimeter)
types:join(string[],string) -> string
- sumI
description: Returns sum of given integer array
usage:sum(integer_array)
types:sum(integer[]) -> integer
- sum#
description: Returns sum of given float array
usage:sum(float_array)
types:sum(float[]) -> float
- includes$
description: Returns true if given string array contains supplied element
usage:includes$(string_array,element)
types:includes$(string[],string) -> integer
- includes#
description: Returns true if given float array contains supplied element
usage:includes#(float_array,element)
types:includes#(float[],string) -> integer
- includesI
description: Returns true if given integer array contains supplied element
usage:includesI(integer_array,element)
types:includesI(integer[],string) -> integer
- Print$
description: Prints the given string array
usage:Print$(string_array)
types:Print$(string[]) -> none
- Print#
description: Prints the given float array
usage:Print#(float_array)
types:Print#(float[]) -> none
- PrintI
description: Prints the given integer array
usage:PrintI(integer_array)
types:PrintI(integer[]) -> none
- extendSS
description: Extends given string arrays with eachother
usage:extendSS(string_array,string_array)
types:extendSS(string[],string[]) -> string[]
- extendFF
description: Extends given float arrays with eachother
usage:extendSS(float_array,float_array)
types:extendSS(float[],float[]) -> float[]
- extendII
description: Extends given integer arrays with eachother
usage:extendSS(integer_array,integer_array)
types:extendSS(integer[],integer[]) -> integer[]
- extendSF
description: Extends given string array with supplied float array
usage:extendSF(string_array,float_array,string_array_first)
types:extendSF(string[],float[],integer) -> string[]
- extendSI
description: Extends given string array with supplied integer array
usage:extendSI(string_array,integer_array,string_array_first)
types:extendSI(string[],integer[],integer) -> string[]
- extendFI
description: Extends given float array with supplied integer array
usage:extendFI(float_array,integer_array,string_array_first)
types:extendFI(float[],integer[],integer) -> float[]
- min#
description: Returns an element with the lowest value from supplied float array
usage:min#(float_array)
types:min#(float[]) -> float
- minI
description: Returns an element with the lowest value from supplied integer array
usage:minI(integer_array)
types:minI(integer[]) -> integer
- max#
description: Returns an element with the largest value from supplied float array
usage:max#(float_array)
types:max#(float[]) -> float
- maxI
description: Returns an element with the largest value from supplied integer array
usage:maxI(integer_array)
types:maxI(integer[]) -> integer
- char_range
description: Returns a range of characters based on input string(example: "a-z")
usage:char_range(regex_char_range)
types:char_range(string) -> string[]
- split
description: Splits given string by supplied delimeter
usage:split(text,delimeter)
types:split(string,string) -> string[]
- list
description: Returns an array containing characters of supplied string
usage:list(text)
types:list(string) -> string[]
- capitalize
description: Returns a string with its first letter capitalized
usage:capitalize(text)
types:capitalize(string) -> string
- center
description: Centers supplied string in middle of an integer range with supplied padding characters
usage:center(text,number,padding_character)
types:center(string,integer,string) -> string
- endsWith
description: Returns true if supplied string ends with given substring
usage:endsWith(text,substring)
types:endsWith(string,string) -> integer
- repeat$
description: Repeats given string n times
usage:repeat$(text,times)
types:repeat$(string,integer) -> integer
- isAlnum
description: Returns true if supplied string contains only alphanumeric characters(A-Za-z0-9)
usage:isAlnum(text)
types:isAlnum(string) -> integer
- isAlpha
description: Returns true if supplied string contains only alphabet letters(A-Za-z)
usage:isAlpha(text)
types:isAlpha(string) -> integer
- isDecimal
description: Returns true if supplied string contains only decimals(0-9)
usage:isDecimal(text)
types:isDecimal(string) -> integer
- isIdentifier
description: Returns True if the string is a valid identifier(can contain: (A-Za-z0-9_), cannot start with:(0-9))
usage:isIdentifier(text)
types:isIdentifier(string) -> integer
- isSpace
description: Returns true if supplied string contains only whitespaces
usage:isSpace(text)
types:isSpace(string) -> integer
- indexOf
description: Returns starting index of supplied substring in given string
usage:indexOf(text,find_substring)
types:indexOf(string,string) -> integer
- isUpper
description: Returns true if supplied string contains only uppercase characters(!(a-z))
usage:isUpper(text)
types:isUpper(string) -> integer
- isLower
description: Returns true if supplied string contains only lowercase characters(!(A-Z))
usage:isLower(text)
types:isLower(string) -> integer
- isTitle
description: Returns true if supplied string starts with an uppercase letter(!(a-z))
usage:isTitle(text)
types:isTitle(string) -> integer
- just
description: Returns supplied string justified to left or right by the given number, with given character
usage:just(text,character,count,L_or_R)
types:just(string,string,integer,string) -> string
- strip
description: Strips given string of supplied characters
usage:strip(text,characters)
types:strip(string,string[]) -> string
- reFind
description: Returns substring found between strings in given string
usage:reFind(text,start,end$)
types:reFind(string,string,string) -> string
- getTextBoundingBoxOffsetY
description: Scans for the nearest pixel color matching that of the given text and returns the y offset
usage:getTextBoundingBoxOffsetY(textId)
types:getTextBoundingBoxOffsetY(integer) -> integer
- wordWrap
description: Wraps words based on the maxWidth parameter
usage:wordWrap(text,maxWidth,forceStrict,lineBreakChar)
types:wordWrap(integer,integer,integer,string) -> string
- strictWordWrap
description: Wraps the given word regardless of spaces
usage:strictWordWrap(word,maxWidth,textSize,lineBreakChar)
types:wordWrap(string,integer,integer,string) -> string