package com.bonus.canteen.core.menu.utils;

import org.apache.commons.lang3.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class CustomUtil {
   public static String trimSpaceTag(String str) {
      if (StringUtils.isBlank(str)) {
         return str;
      } else {
         String regExSpace = "\\s*|\t|\r|\n";
         Pattern pSpace = Pattern.compile(regExSpace, 2);
         Matcher mSpace = pSpace.matcher(str);
         str = mSpace.replaceAll("");
         return str.trim();
      }
   }
}
