Skip to content

Wonkey types string

wonkey:wonkey.types.String

Struct String#

Primitive string type

Properties
CStringLength Gets the CString length of the string. (read only)
Length Gets the length of the string. (read only)
Utf8Length Gets the utf8 length of the string. (read only)
Methods
Capitalize Capitalizes the string.
Contains Checks if the string contains a substring.
Dup Duplicates a string.
EndsWith Check if the string ends with another string.
Find Finds a substring in the string.
FindLast Finds the last occurance of a substring in the string.
Join Joins an array of strings.
Left Gets a substring from the start of the string.
Mid Gets a substring from the middle of the string.
PadLeft Returns a new string of a specified length in which the beginning of the current string.
PadRight Returns a new string of a specified length in which the end of the current string.
Replace Replace all occurances of a substring with another string.
Right Gets a substring from the end of the string.
Slice Extracts a substring from the string.
Split Splits this string.
StartsWith Check if the string starts with another string.
ToCString Converts the string to a CString.
ToLower Convert the string to lowercase.
ToUpper Convert the string to uppercase.
ToWString Converts the string to a WString.
Trim Trim whitespace from a string.
TrimEnd Trim whitespace from the end of a string.
TrimStart Trim whitespace from the start a string.
Functions
FromCString Creates a string from a CString.
FromChar Creates a string containing a single character.
FromChars Creates a string containing characters in an array.
FromWString Creates a string from a null terminated WString.