Class ZenKeywordUtil

java.lang.Object
com.blamejared.crafttweaker.api.zencode.util.ZenKeywordUtil

public final class ZenKeywordUtil extends Object
  • Method Details

    • isKeyword

      public static boolean isKeyword(String string)
      Checks if the given String is a reserved ZenCode keyword.
      Parameters:
      string - String to check.
      Returns:
      True if it is a keyword, false otherwise.
    • sanitize

      public static String sanitize(String string)
      Ensures that if the given String is a keyword that it is enclosed in quotation marks.
      Parameters:
      string - The string to sanitize
      Returns:
      The provided string unless it is a keyword, in which case it will be in quotation marks.