Documents

STR

str.get (str.at)

Returns a character from a specific location in the string.

Syntax

str.get("Hello World!", 7)
str.set

Sets a character with a specific location in the string.

Syntax

str.set("Hello World!", 6, '-')
str.contains

Returns a value indicating whether a specified substring occurs within this string.

Syntax

str.contains("Hello World!", 'World')
str.empty (str.null)

Tests whether the string contains characters.

Syntax

str.empty("")
str.start

Checks whether the string starts with the specified prefix.

Syntax

str.start("Hello World!", "World!")
str.end

Checks whether the string ends with the specified suffix.

Syntax

str.end("Hello World!", "World!")
str.equals

Determines whether two String have the same value.

Syntax

str.equals("Hello World!", "Hello World!")
str.not

Determine if two strings do not have the same value.

Syntax

str.not("Hello World!", "Hello-World!")
str.length (str.len)

Gets the number of characters in the current string.

Syntax

str.length("Hello World!")
str.trim

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!")
str.trimstart

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")
str.trimend

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!", "!")
str.find

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")
str.findlast

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")
str.lower

Returns a copy of this string converted to lowercase.

Syntax

str.lower("Hello World!")
str.upper

Returns a copy of this string converted to uppercase.

Syntax

str.upper("Hello World!")
str.left

Extracts the left part of a string.

Syntax

str.left("Hello World!", 5)
str.right

Extracts the right part of a string.

Syntax

str.right("Hello World!", 5)
str.sub

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)
str.remove

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)
str.replace

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)
str.padleft

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)
str.padright

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)
str.padding

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)
str.guid

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)
str.capitalize

Returns a new capitalize string

Syntax

str.capitalize('hello world') return "Hello World"
str.res

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"

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub