Package rsb.util

Class StringUtil

java.lang.Object
rsb.util.StringUtil

public class StringUtil extends Object
  • Constructor Details

    • StringUtil

      public StringUtil()
  • Method Details

    • join

      public static String join(String[] s)
    • drawLine

      public static void drawLine(Graphics render, int row, String text)
      Draws a line on the screen at the specified index. Default is green. Available colours: red, green, cyan, purple, white.
      Parameters:
      render - The Graphics object to be used.
      row - The index where you want the text.
      text - The text you want to render. Colours can be set like [red].
    • throwableToString

      public static String throwableToString(Throwable t)
    • getBytesUtf8

      public static byte[] getBytesUtf8(String string)
    • newStringUtf8

      public static String newStringUtf8(byte[] bytes)
    • convertIntelliJPath

      public static String convertIntelliJPath(Class<?> clazz, String file)
      Gets the compiled path of the class containing the object and replaces the path with the values needed to direct it to the non-compiled path with the .java file to access Used only in IntelliJ due to the weird behavior when building w/ the run-time compiler for test scripts TODO: Remove this via Gradle behavior such as a resources folder
      Parameters:
      clazz - The class of the object in the same directory as the one we wish to find
      file - The file we wish to locate within the above directory
      Returns:
      The path of the item in IntelliJ's non-build path