Str

Contain various methods to manipulate string

As of v1.1.5, you can access instance method from a string. Most of the methods are just a wrapper around Java String class. You can check their documentation for more detail.

Java String: https://docs.oracle.com/javase/8/docs/api/java/lang/String.html

Available Methods:

Examples

    var text = "Hello World!"

    text.toLowerCase() //hello world!

    var array = text.split(" ");
    Con.out(array) //["Hello", "World!"]

    var joined = Str.join(", ", array)
    Con.out(joined) //Hello, World!

Static Methods
lockMatch
static number lockMatch(string1: string, string2: string)

Get the similarity between the two string. This is the same algorithm used in text recognition

Return
number The similarity between the input strings. Range 0 - 1.

© 2021 - Macrorify by KoK-CODE