String
Compares two strings lexicographically1.
Type ID: kaya:string
Format
| Field | Type | Default | Description |
|---|---|---|---|
comparator |
Comparator | Determines how the strings are compared lexicographically. | |
first |
String Provider | The first string to compare to. | |
second |
String Provider | The second string to be compared. | |
case_sensitive |
Boolean Provider | true |
Determines whether comparing the strings should be case-sensitive. |
Example
This example checks if the first string is lexographically less than the second string (which is true.)
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |
-
Comparing strings lexicographically means comparing the order of the strings' characters, similar to how words are arranged in a dictionary ↩