package com.beanpodtech.allinone.utils;

public class EmojiUtils {
    public static String getEmoji(String userName) {
//        if (userName.length() < 6) {
//            return userName;
//        }
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < userName.length(); i++) {
            String c = userName.substring(i, i + 1);
//            char c = userName.charAt(i);
            if ("0".equals(c)) {
                //鼠
                builder.append("\uD83D\uDC2D");
            } else if ("1".equals(c)) {
                //牛
                builder.append("\uD83D\uDC2E");
            } else if ("2".equals(c)) {
                //虎
                builder.append("\uD83D\uDC2F");
            } else if ("3".equals(c)) {
                //兔
                builder.append("\uD83D\uDC30");
            } else if ("4".equals(c)) {
                //
                builder.append("\uD83D\uDC31");
            } else if ("5".equals(c)) {
                builder.append("\uD83D\uDC32");
            } else if ("6".equals(c)) {
                builder.append("\uD83D\uDC33");
            } else if ("7".equals(c)) {
                builder.append("\uD83D\uDC34");
            } else if ("8".equals(c)) {
                builder.append("\uD83D\uDC35");
            } else if ("9".equals(c)) {
                builder.append("\uD83D\uDC36");
            } else {
                builder.append(c);
            }
        }
        return builder.toString();

    }
}
