Utilities
Functions
Contains
Returns true if the string contains the substring.
Parameters:
Name | Type | Description |
---|---|---|
text | String | The text to search |
subtext | String | The substring to search for |
Return Type: Boolean
Signatures:
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
Usage:
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
Usage:
Signatures:
Index Of
Returns the index of the first occurrence of the substring in the text.
Parameters:
Name | Type | Description |
---|---|---|
text | String | The text to search |
subtext | String | The substring to search for |
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
Usage:
Signatures:
Is Number
Checks if a string contains a number.
Parameters:
Name | Type | Description |
---|---|---|
text | String | The text to check. |
Return Type: Boolean
Usage:
Signatures:
Length Of
Returns the length of a string in characters.
Parameters:
Name | Type | Description |
---|---|---|
text | String | The text to get the length of |
Return Type: Integer
Signatures:
Replace All
Replace all occurrences of a substring in a string with another string.
Parameters:
Name | Type | Description |
---|---|---|
text | String | The text to search |
substr | String | The substring to find and replace |
newtext | String | The string to replace the substring with |
Return Type: String
Signatures:
Split
Split a string into an array of strings based on a delimiter.
Parameters:
Name | Type | Description |
---|---|---|
text | String | The text to split |
delimiter | Char | The character to split the text on |
Return Type: Vector
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
Usage:
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
Usage:
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
Usage:
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: Unsigned Integer
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 |
Usage:
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: