docs/functions/str.html
Returns a character from a specific location in the string.
Syntax
str.get("Hello World!", 7)
Sets a character with a specific location in the string.
Syntax
str.set("Hello World!", 6, '-')
Returns a value indicating whether a specified substring occurs within this string.
Syntax
str.contains("Hello World!", 'World')
Tests whether the string contains characters.
Syntax
str.empty("")
Checks whether the string starts with the specified prefix.
Syntax
str.start("Hello World!", "World!")
Checks whether the string ends with the specified suffix.
Syntax
str.end("Hello World!", "World!")
Determines whether two String have the same value.
Syntax
str.equals("Hello World!", "Hello World!")
Determine if two strings do not have the same value.
Syntax
str.not("Hello World!", "Hello-World!")
Gets the number of characters in the current string.
Syntax
str.length("Hello World!")
Returns a new string in which all leading and trailing occurrences of a set of specified characters from the current string are removed.
Syntax
Removes all leading and trailing white-space characters from the current string.
str.trim(" Hello World! ")
Removes all leading and trailing 'H!' characters from the current string.
str.trim("Hello World!", "H!")
Returns a new string in which all leading occurrences of a set of specified characters from the current string are removed.
Syntax
Removes all leading white-space characters from the current string.
str.trimstart(" Hello World!")
Removes all leading 'H' characters from the current string.
str.trimstart("Hello World!", "H")
Returns a new string in which all trailing occurrences of a set of specified characters from the current string are removed.
Syntax
Removes all trailing white-space characters from the current string.
str.trimend("Hello World! ")
Removes all trailing '!' characters from the current string.
str.trimend("Hello World!", "!")
Searches a string in a forward direction for the first occurrence of a substring that matches a specified sequence of characters.
Syntax
str.find("Hello World!", "lo")
Searches a string in a backward direction for the first occurrence of a substring that matches a specified sequence of characters.
Syntax
str.findlast("Hello World!", "Wor")
Returns a copy of this string converted to lowercase.
Syntax
str.lower("Hello World!")
Returns a copy of this string converted to uppercase.
Syntax
str.upper("Hello World!")
Extracts the left part of a string.
Syntax
str.left("Hello World!", 5)
Extracts the right part of a string.
Syntax
str.right("Hello World!", 5)
Copies a substring of at most some number of characters from a string beginning from a specified position.
Syntax
str.sub("Hello World!", 5)
str.sub("Hello World!", 0, 5)
Removes an element or a range of elements in a string from a specified position.
Syntax
str.replace("Hello World!", " ")
str.remove("Hello World!", 5)
str.remove("Hello World!", 5, 1)
Replace elements in a string at a specified position with specific characters or characters copied from other ranges or strings.
Syntax
str.replace("Hello World!", "World", "User")
str.replace("Hello World!", "world", "user", true)
Returns a new string of a specified length in which the beginning of the current string is padded with spaces or with a specified character.
Syntax
str.padleft("Hello World!", "*")
str.padleft("Hello World!", "*", 3)
Returns a new string of a specified length in which the end of the current string is padded with spaces or with a specified character.
Syntax
str.padright("Hello World!", "*")
str.padright("Hello World!", "*", 3)
Returns a new string of a specified length in which the start and end of the current string is padded with spaces or with a specified character.
Syntax
str.padding("Hello World!", "*")
str.padding("Hello World!", "*", 3)
Returns a new guid string
Syntax
str.guid return 00000000000000000000000000000000
str.guid(1) return 00000000-0000-0000-0000-000000000000
str.guid(2) return {00000000-0000-0000-0000-000000000000}
str.guid(3) return (00000000-0000-0000-0000-000000000000)
Returns a new capitalize string
Syntax
str.capitalize('hello world') return "Hello World"
Returns a string resource from the executable file. "shell32.dll" is the default file.
Syntax
str.res(-4640) return "Runs the selected command with elevation" from "shell32.dll"
str.res('explorer.dll', -22000) return "Desktop"