gitflow-hotfix-stash: newline_parse

This commit is contained in:
Matthew Cech
2019-04-15 22:49:12 -07:00
parent 99fc40bf81
commit e312f50056
3 changed files with 19 additions and 2 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ import java.util.function.Consumer;
// //
// [ExampleSection] // [ExampleSection]
// Key=Value // Key=Value
// Valid Ridiculous Key&\n\t_.:;foo = \tValid Ridiculous Value*&%$()^.[]{}@ // Valid Ridiculous Key&\n\t_.:;foo = \tValid Ridiculous Value*&%$()^.[]{}@
// EmptyValue= // EmptyValue=
// //
// Note that the sections are NOT designed to allow for duplicate keys across them. // Note that the sections are NOT designed to allow for duplicate keys across them.
+1 -1
View File
@@ -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());
} }
+17
View File
@@ -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;
}
}