Utilities
Utilities Guides
Functions
Convert To Double
Convert the passed in string into a double. This can fail in an error if
the value is not a number, consider using Is Number
to check before
converting a string.
Parameters
Name | Type | Description |
---|---|---|
text | String | The text to convert. |
Return Type - Double
Signatures
Convert To Integer
Convert the passed in string into an integer. This can fail in an error if
the value is not an integer, consider using Is Integer
to check before
converting a string.
Parameters
Name | Type | Description |
---|---|---|
text | String | The text to convert. |
Return Type - Integer
Signatures
Is Double
Checks if a string contains a number.
Parameters
Name | Type | Description |
---|---|---|
text | String | The text to check. |
Return Type - Boolean
Signatures
Is Integer
Checks if a string contains an integer value.
Parameters
Name | Type | Description |
---|---|---|
text | String | The text to check. |
Return Type - Boolean
Signatures
Is Number
Checks if a string contains a number.
Parameters
Name | Type | Description |
---|---|---|
text | String | The text to check. |
Return Type - Boolean
Signatures
To Lowercase
Return a lowercase version of the passed in string.
Parameters
Name | Type | Description |
---|---|---|
text | String | The text to convert. |
Return Type - String
Signatures
To Uppercase
Return a UPPERCASE version of the passed in string.
Parameters
Name | Type | Description |
---|---|---|
text | String | The text to convert. |
Return Type - String
Signatures
Trim
Return a new string that removes the spaces from the start and end of the input string.
Parameters
Name | Type | Description |
---|---|---|
text | String | The string to trim. |
Return Type - String
Signatures
Rnd
Rnd
Generates a random number between ‘min’ and max
, including ‘min’ and ‘max’.
Parameters
Name | Type | Description |
---|---|---|
min | Integer | the Integer representing of minimum bound. |
max | Integer | the Integer representing of maximum bound. |
Return Type - Integer
Signatures
Rnd
Generates a random number between 0 and 1
Return Type - Float
Signatures
Rnd
Generates a random number between 0 and ubound
.
Parameters
Name | Type | Description |
---|---|---|
ubound | Integer | the Integer representing the upper bound. |
Return Type - Integer
Signatures
Current Ticks
Gets the number of milliseconds that have passed since the program was started.
Return Type - undefined
Signatures
Delay
Puts the program to sleep for a specified number of milliseconds. If this is larger than 1 second, SplashKit will check to see if the user tries to quit during the delay. If the user does quit, the delay function returns without waiting.
Parameters
Name | Type | Description |
---|---|---|
milliseconds | Integer | The number of milliseconds to wait |
Signatures
Display Dialog
Display a dialog to the screen with a message for the user.
Parameters
Name | Type | Description |
---|---|---|
title | String | The title of the dialog window. |
msg | String | The message for the dialog window. |
output_font | Font | The font for the dialog text |
font_size | Integer | The size of the font for the dialog text |
Signatures
File As String
Return a SplashKit resource of Resource Kind
with name filename
as a string.
Parameters
Name | Type | Description |
---|---|---|
filename | String | The filename of the resource. |
kind | Resource Kind | The kind of resource. |
Return Type - String
Signatures