gitflow-hotfix-stash: newline_parse
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ public class Main extends ListenerAdapter
|
|||||||
|
|
||||||
// Bot startup
|
// Bot startup
|
||||||
kitty = new JDABuilder(AccountType.BOT).setToken(Ref.TestToken).buildBlocking();
|
kitty = new JDABuilder(AccountType.BOT).setToken(Ref.TestToken).buildBlocking();
|
||||||
kitty.getPresence().setGame(Game.playing("with a new build"));
|
kitty.getPresence().setGame(Game.playing("with digital yarn"));
|
||||||
kitty.addEventListener(new Main());
|
kitty.addEventListener(new Main());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package utils;
|
||||||
|
|
||||||
|
public class StringUtils
|
||||||
|
{
|
||||||
|
public static String UnEscape(String str)
|
||||||
|
{
|
||||||
|
str = str.replaceAll("\\\\b", "\b");
|
||||||
|
str = str.replaceAll("\\\\n", "\n");
|
||||||
|
str = str.replaceAll("\\\\t", "\t");
|
||||||
|
str = str.replaceAll("\\\\r", "\r");
|
||||||
|
str = str.replaceAll("\\\\f", "\f");
|
||||||
|
str = str.replaceAll("\\\\\"", "\"");
|
||||||
|
str = str.replaceAll("\\\\\\\\", "\\");
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user