Package rsb.util
Class StringUtil
java.lang.Object
rsb.util.StringUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 folderstatic void
Draws a line on the screen at the specified index.static byte[]
getBytesUtf8
(String string) static String
static String
newStringUtf8
(byte[] bytes) static String
-
Constructor Details
-
StringUtil
public StringUtil()
-
-
Method Details
-
join
-
drawLine
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
-
getBytesUtf8
-
newStringUtf8
-
convertIntelliJPath
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 findfile
- The file we wish to locate within the above directory- Returns:
- The path of the item in IntelliJ's non-build path
-