CTCV2/app/src/main/java/cutthecord/commands/commands/CmdFlip.java

49 lines
1.4 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package cutthecord.commands.commands;
import cutthecord.commands.CommandHandler;
import lanchon.dexpatcher.annotation.DexAdd;
@DexAdd
public class CmdFlip extends CommandHandler.Command {
@DexAdd
@Override
public String handleCommand(String msg) {
StringBuilder sb = new StringBuilder(msg.toLowerCase());
sb.reverse();
return sb.toString().replace("a", "ɐ")
.replace("b", "q")
.replace("c", "ɔ")
.replace("d", "p")
.replace("e", "ǝ")
.replace("f", "ɟ")
.replace("g", "ƃ")
.replace("h", "ɥ")
.replace("i", "ı")
.replace("j", "ɾ")
.replace("k", "ʞ")
.replace("l", "ן")
.replace("m", "ɯ")
.replace("n", "u")
//.replace("o", "o")
.replace("p", "d")
.replace("q", "b")
.replace("r", "ɹ")
//.replace("s", "s")
.replace("t", "ʇ")
.replace("u", "n")
.replace("v", "ʌ")
.replace("w", "ʍ")
//.replace("x", "x")
.replace("y", "ʎ");
//.replace("z", "z");
}
@DexAdd
@Override
public String getPopupInfo() {
return "Flips text (like “ʇɥıs”)";
}
}